JP5484994B2 - Facial image synthesis device, facial image synthesis method, and program - Google Patents

Facial image synthesis device, facial image synthesis method, and program Download PDF

Info

Publication number
JP5484994B2
JP5484994B2 JP2010088117A JP2010088117A JP5484994B2 JP 5484994 B2 JP5484994 B2 JP 5484994B2 JP 2010088117 A JP2010088117 A JP 2010088117A JP 2010088117 A JP2010088117 A JP 2010088117A JP 5484994 B2 JP5484994 B2 JP 5484994B2
Authority
JP
Japan
Prior art keywords
image
face
brightness
failed
appropriate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010088117A
Other languages
Japanese (ja)
Other versions
JP2011223173A (en
Inventor
洋一 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Imaging Corp
Original Assignee
Olympus Imaging 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 Olympus Imaging Corp filed Critical Olympus Imaging Corp
Priority to JP2010088117A priority Critical patent/JP5484994B2/en
Publication of JP2011223173A publication Critical patent/JP2011223173A/en
Application granted granted Critical
Publication of JP5484994B2 publication Critical patent/JP5484994B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

本発明は、顔画像合成装置、顔画像合成方法、およびプログラムに関し、詳しくは、逆光状態や陰影の差の激しい屋外等で撮影した失敗画像の復元が可能な顔画像合成装置、顔画像合成方法、およびプログラムに関する。 The present invention relates to a face image composition device, a face image composition method, and a program. More specifically , the present invention relates to a face image composition device and a face image composition method capable of restoring a failed image taken outdoors or in a backlit state or with a large difference in shadow. And related to the program.

近年、デジタルカメラ等の撮影機能付き携帯機器(撮影装置)は、画像処理機能が向上し、様々な苦手撮影シーンを克服してきている。例えば、暗いシーンや逆光シーンにおいては、撮像部の感度やゲインを高くし、また、部分的に感度やゲインを切り換えることにより、フィルムカメラの時代では不可能であった処理を行い、失敗を防止している。また、画像処理技術の向上により、露出不足により失敗した撮影画像であっても、画像の明るさを補正することにより適正画像とすることも可能となってきている。   In recent years, portable devices (photographing devices) with a photographing function such as a digital camera have improved image processing functions and have overcome various poor photographing scenes. For example, in dark or backlit scenes, the sensitivity and gain of the imaging unit are increased, and the sensitivity and gain are partially switched to perform processing that was impossible in the era of film cameras and prevent failures. doing. In addition, improvement in image processing technology makes it possible to obtain a proper image by correcting the brightness of an image, even if the image has failed due to insufficient exposure.

さらに、最近では、画像を合成することにより、撮影者の所望する写真を得るようにした撮影装置が提案されている。例えば、特許文献1には、目を閉じた人物像に対して目を開かせるような画像処理を行い、撮影画像を修正する画像処理方法が提案されている。すなわち、目を閉じた人物画像の目の部分を、開いている目の画像に置き換える合成を行うことが開示されている。   Furthermore, recently, a photographing apparatus has been proposed in which a photograph desired by a photographer is obtained by combining images. For example, Patent Document 1 proposes an image processing method that corrects a captured image by performing image processing that opens eyes on a person image with closed eyes. That is, it is disclosed that the eye portion of a person image with closed eyes is replaced with an open eye image.

特開2001−197296号公報JP 2001-197296 A

このように、画像合成により失敗画像を修正する装置や方法は提案されているが、画像合成を利用して露出不良の撮影画像から適正画像を得ることは、何ら開示されていない。すなわち、黒つぶれや白とびのように、背景と顔画像に激しい輝度差がある状況においては、顔の部分の陰影等の情報が失われてしまい、画像の明るさを補正するような画像処理では、救済することができない。一方、撮影画像の内の顔や目の部分等の画像を予め用意した画像に置き換える画像合成は提案されているが、露出不良の撮影画像を救済するものではない。   As described above, an apparatus and a method for correcting a failed image by image synthesis have been proposed, but there is no disclosure of obtaining an appropriate image from a captured image with poor exposure using image synthesis. In other words, in situations where there is a significant difference in brightness between the background and the face image, such as blackout or overexposure, information such as shading on the face is lost, and image processing that corrects the brightness of the image So you can't help. On the other hand, image composition has been proposed in which images such as the face and eyes in a photographed image are replaced with images prepared in advance, but it does not relieve a photographed image with poor exposure.

本発明は、このような事情を鑑みてなされたものであり、黒つぶれや白とび等、撮影画像の内の顔等の部分の陰影に関する情報が失われている撮影画像を簡単に復元することの可能な顔画像合成装置、顔画像合成方法、およびプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and it is possible to easily restore a captured image in which information regarding shadows of a portion such as a face in the captured image is lost, such as blackout or overexposure. An object of the present invention is to provide a face image synthesizing device, a face image synthesizing method, and a program.

の発明に係わる顔画像合成装置は、顔の部分を含む画像を記憶する顔画像データベースと、撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定する適正画像判定部と、上記適正画像判定部によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正する第1補正部と、上記適正画像判定部によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、上記顔画像データベースの中から上記失敗画像の中の顔と一致または類似する顔画像を検索し、この検索した顔画像の明るさを補正する第2補正部と、上記第2補正部によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行う画像合成部と、を有する。 The face image synthesizer according to the first aspect of the present invention is a face image database that stores an image including a face portion, and an appropriateness for determining whether the image is appropriate based on the brightness of the face portion in the photographed image. A first correction unit that corrects the captured image when the image is determined to be a failure image by the image determination unit and the appropriate image determination unit; If the image determination unit determines that the image is a failed image, and if the image cannot be made an appropriate image by correcting the brightness of the captured image, it matches or is similar to the face in the failed image from the face image database A second correction unit that searches for a face image to be corrected, corrects the brightness of the searched face image, and an image for performing image synthesis that replaces the face image corrected by the second correction unit with the face image of the failed image. A combining unit, the.

の発明に係わる顔画像合成装置は、上記第の発明において、上記適正画像判定部は、上記撮影画像のヒストグラムを生成し、このヒストグラムに基づいて判定する。
の発明に係わる顔画像合成装置は、上記第の発明において、上記適正画像判定部は、上記撮影画像の顔の部分の平均的な明るさと背景の明るさの差に基づいて判定する。
の発明に係わる顔画像合成装置は、上記第の発明において、上記適正画像判定部は、上記撮影画像の顔の部分の中の明暗の差に基づいて判定する。
In the face image synthesizing apparatus according to the second invention, in the first invention, the appropriate image determination unit generates a histogram of the photographed image and makes a determination based on the histogram.
According to a third aspect of the present invention, in the first aspect of the invention, the appropriate image determination unit makes a determination based on the difference between the average brightness of the face portion of the photographed image and the brightness of the background. .
In the face image composition device according to a fourth aspect of the present invention, in the first aspect , the appropriate image determination unit makes a determination based on a difference in brightness in the face portion of the photographed image.

の発明に係わる顔画像合成装置は、上記第の発明において、上記第2補正部は、上記検索した顔画像が、上記背景の明るさから、上記撮影画像の顔の部分の平均的な明るさと上記背景の明るさの差に基づく補正量を減算した明るさとなるように補正する。 In the face image synthesizing device according to a fifth aspect of the present invention, in the first aspect , the second correction unit is configured to obtain an average of the face portion of the photographed image based on the brightness of the background. The brightness is corrected to a brightness obtained by subtracting the correction amount based on the difference between the brightness of the background and the brightness of the background.

の発明に係わる顔画像合成装置は、上記第の発明において、上記第2補正部は、上記撮影画像の顔の部分の中の明暗の差に基づいて失敗画像と判定された場合には、上記検索した顔画像に対して、上記顔の部分の中の明暗差を圧縮するように補正する。 According to a sixth aspect of the present invention, in the first aspect , when the second correction unit determines that the image is a failure image based on a difference in brightness in the face portion of the photographed image. Corrects the searched face image so as to compress the difference in brightness in the face portion.

の発明に係わる顔画像合成装置は、上記第の発明において、上記合成部は、上記第2補正部によって補正された顔画像の目鼻位置を、上記失敗画像の顔画像の目鼻位置と一致するように画像を置き換える。
の発明に係わる顔画像補正及び合成装置は、上記第の発明において、上記データベースは、人物ごとに、表情と顔の向きが異なる顔画像を記憶する。
According to a seventh aspect of the present invention, there is provided the face image composition device according to the first aspect , wherein the composition unit uses the eye-nose position of the face image corrected by the second correction unit as the eye-nose position of the face image of the failure image. Replace the image to match.
Eighth face image correction and synthesizing apparatus according to the present invention, in the first aspect, the database for each person, the orientation of the expression and face storing different face images.

の発明に係わる顔画像合成装置は、上記第の発明において、さらに、画像を表示する表示部と、上記表示部に表示する画像の表示制御部と、を有し、上記表示制御部は、上記撮影画像の顔の部分を拡大表示し、この拡大表示した顔の部分を、上記合成部によって合成された顔画像を拡大表示し、この合成された顔画像を含む撮影画像の元のサイズに縮小表示する。 According to a ninth aspect of the present invention, there is provided a face image composition device according to the first aspect , further comprising a display unit for displaying an image and a display control unit for an image displayed on the display unit. Enlarges and displays the face portion of the photographed image, enlarges and displays the face image synthesized by the composition unit, and displays the original face of the photographed image including the synthesized face image. Reduce to size.

10の発明に係わる顔画像合成方法は、撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定し、上記適正画像か否かの判定によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正し、上記適正画像か否かの判定によって失敗画像と判定され、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、顔の部分を含む画像を記憶する顔画像データベースの中から上記失敗画像の中の顔と一致する顔画像を検索し、この検索した顔画像の明るさを補正し、上記補正によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行う。 The face image composition method according to the tenth aspect of the present invention determines whether or not the image is appropriate based on the brightness of the face portion in the captured image, and determines that the image is a failure image by determining whether or not the image is appropriate. In this case, when the appropriate image is obtained by correcting the brightness of the captured image, the captured image is corrected and determined as a failed image by determining whether or not the image is the appropriate image, and the brightness of the captured image is corrected. If a face image matching the face in the failed image is searched from the face image database storing the image including the face portion when the image cannot be determined as an appropriate image by the brightness, the brightness of the searched face image Then, image synthesis is performed in which the face image corrected by the correction is replaced with the face image of the failed image.

11の発明に係わるプログラムは、顔画像データベースを有するコンピュータにおいて、顔画像合成を行わせるコンピュータプログラムにおいて、撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定するステップと、上記適正画像か否かの判定によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正するステップと、上記適正画像か否かの判定によって失敗画像と判定され、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、上記顔画像データベースの中から上記失敗画像の中の顔と一致する顔画像を検索し、この検索した顔画像の明るさを補正するステップと、上記補正によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行うステップと、をコンピュータに実行させる。 A program according to an eleventh aspect of the invention is a computer program for performing face image synthesis in a computer having a face image database, and determines whether or not the image is appropriate based on the brightness of the face portion in the photographed image. And a step of correcting the captured image when the image is determined to be a failed image by determining whether or not the image is an appropriate image, and when the image becomes an appropriate image by correcting the brightness of the captured image; If it is determined as a failed image by determining whether or not a correct image cannot be obtained by correcting the brightness of the captured image, a face image that matches the face in the failed image is selected from the face image database. Searching, correcting the brightness of the searched face image, and correcting the face image corrected by the correction as the face image of the failed image. To execute a step of performing image combination changing can, to a computer.

本発明によれば、黒つぶれや白とび等、撮影画像の内の顔等の部分の陰影に関する情報が失われている撮影画像を簡単に復元することの可能な顔画像合成装置、顔画像合成方法、およびプログラムを提供することができる。
According to the present invention, a face image composition device and a face image composition capable of easily restoring a photographed image in which information regarding shadows of a part of the photographed image such as a blackout or a whiteout is lost. Methods and programs can be provided.

本発明の第1実施形態に係わるカメラの主として電気的構成を示すブロック図である。It is a block diagram which shows mainly an electrical structure of the camera concerning 1st Embodiment of this invention. 本発明の第1実施形態に係わるカメラにおける顔画像の合成について説明する図である。It is a figure explaining the synthesis | combination of the face image in the camera concerning 1st Embodiment of this invention. 本発明の第1実施形態に係わるカメラにおいて、被写体の輝度分布を示す図であり、(a)は白とびの被写体の場合の輝度分布を示し、(b)は黒つぶれの被写体の輝度分布を示す図である。In the camera according to the first embodiment of the present invention, it is a diagram showing the luminance distribution of the subject, (a) shows the luminance distribution in the case of the overexposure subject, (b) shows the luminance distribution of the blackened subject. FIG. 本発明の第1実施形態に係わるカメラにおいて、被写体の輝度分布の変形例であって、ヒストグラムによって示す図であり、(a)は白とびの被写体の場合の輝度分布を示し、(b)は黒つぶれの被写体の輝度分布を示す図である。In the camera according to the first embodiment of the present invention, the luminance distribution of a subject is a modified example and is shown by a histogram, (a) shows the luminance distribution in the case of an overexposed subject, (b) shows It is a figure which shows the luminance distribution of the photographic subject. 本発明の第1実施形態に係わるカメラの顔補正・合成の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of face correction and a synthesis | combination of the camera concerning 1st Embodiment of this invention. 本発明の第1実施形態の変形例に係わるカメラにおいて、被写体の輝度分布を示す図であり、(a)は白とびの被写体の場合の輝度分布を示し、(b)は黒つぶれの被写体の輝度分布を示す図である。In the camera according to the modification of the first embodiment of the present invention, it is a diagram showing the luminance distribution of the subject, (a) shows the luminance distribution in the case of overexposure subject, (b) is the subject of the blackened subject It is a figure which shows luminance distribution. 本発明の第1実施形態の変形例に係わるカメラの顔補正・合成の変形例の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the modification of the face correction and composition of the camera concerning the modification of 1st Embodiment of this invention. 本発明の第2実施形態に係わるカメラにおける顔画像の合成について説明する図であり、(a)は顔全体が暗い領域に入った場合の様子を示し、(b)は(a)の顔画像を補完用参照データを用いて合成した画像を示す。It is a figure explaining the synthesis | combination of the face image in the camera concerning 2nd Embodiment of this invention, (a) shows a mode when the whole face enters into the dark area | region, (b) is a face image of (a). Is an image synthesized using the reference data for complementation. 本発明の第2実施形態に係わるカメラにおける顔画像の合成について説明する図であり、(a)は顔の半分が暗い領域に入った場合の輝度分布を示し、(b)は(a)の顔画像を補完用参照データを用いて合成した場合の輝度分布を示す。It is a figure explaining the synthesis | combination of the face image in the camera concerning 2nd Embodiment of this invention, (a) shows the luminance distribution when the half of a face enters into the dark area | region, (b) is (a). The luminance distribution when a face image is synthesized using reference data for complementation is shown. 本発明の第2実施形態に係わるカメラにおいて、顔全体が暗いに入った場合の輝度分布を示し、(a)は補正・合成前の輝度分布であり、(b)は補正・合成後の輝度分布を示す。In the camera according to the second embodiment of the present invention, the luminance distribution when the entire face is dark is shown, (a) is the luminance distribution before correction and synthesis, and (b) is the luminance after correction and synthesis. Show the distribution. 本発明の第2実施形態に係わるカメラにおいて、顔部分が輝度差の大きい場合の輝度分布を示し、(a)は補正・合成前の輝度分布であり、(b)は補正・合成後の輝度分布を示す。In the camera according to the second embodiment of the present invention, the luminance distribution is shown when the face portion has a large luminance difference, (a) is the luminance distribution before correction and synthesis, and (b) is the luminance after correction and synthesis. Show the distribution. 本発明の第2実施形態に係わるカメラの顔補正・合成の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of face correction and a synthesis | combination of the camera concerning 2nd Embodiment of this invention. 本発明の第2実施形態に係わるカメラの失敗顔部判定の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the unsuccessful face part determination of the camera concerning 2nd Embodiment of this invention. 本発明の第2実施形態に係わるカメラの失敗度合判定の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the failure degree determination of the camera concerning 2nd Embodiment of this invention. 本発明の第2実施形態に係わるカメラの失敗度に合わせDB顔画像を補正の動作を示すフローチャートである。It is a flowchart which shows operation | movement of correction | amendment of DB face image according to the failure degree of the camera concerning 2nd Embodiment of this invention. 本発明の第2実施形態の変形例に係わるカメラにおける顔補正・合成した顔部分の表示を示す図である。It is a figure which shows the display of the face part which carried out face correction and the synthesis | combination in the camera concerning the modification of 2nd Embodiment of this invention. 本発明の第2実施形態の変形例に係わるカメラにおける被写体顔画像と補正DB顔画像の合成の補正の動作を示すフローチャートである。It is a flowchart which shows the correction | amendment operation | movement of the synthesis | combination of a to-be-photographed object face image and correction | amendment DB face image in the camera concerning the modification of 2nd Embodiment of this invention. 本発明の第2実施形態に係わるカメラにおいて、顔DBの顔画像の取得を説明する図である。It is a figure explaining acquisition of the face image of face DB in the camera concerning a 2nd embodiment of the present invention. 本発明の第2実施形態に係わるカメラにおいて、顔DBの顔画像の取得を説明する図である。It is a figure explaining acquisition of the face image of face DB in the camera concerning a 2nd embodiment of the present invention. 本発明の第2実施形態に係わるカメラにおいて、顔DBに記憶された顔画像の一例を示す図である。It is a figure which shows an example of the face image memorize | stored in face DB in the camera concerning 2nd Embodiment of this invention. 本発明の第2実施形態に係わるカメラの顔画像DB作成の動作を示すフローチャートである。It is a flowchart which shows operation | movement of face image DB preparation of the camera concerning 2nd Embodiment of this invention. 本発明の第3実施形態に係わるカメラの主として電気的構成を示すブロック図である。It is a block diagram which shows mainly an electrical structure of the camera concerning 3rd Embodiment of this invention.

以下、図面に従って、本発明を適用したカメラを用いて好ましい実施形態について説明する。本発明の好ましい一実施形態に係わるカメラは、デジタルカメラであり、撮像部を有し、この撮像部によって被写体像を画像データに変換し、この変換された画像データに基づいて、被写体像を本体の背面に配置した表示部にライブビュー表示する。撮影者はライブビュー表示を観察することにより、構図やシャッタチャンスを決定する。レリーズ操作時には、画像データが記録部に記録される。記録部に記録された画像データは、再生モードを選択すると、表示部に再生表示することができる。また、画像データを記録する際、または記録済みの画像データを再生する際に、逆光等により、被写体の顔の部分が失敗画像となった場合には、顔データベース(DB)から同一人物の顔の画像データを読出し、周囲の明るさと違和感が生じないように明るさを補正した上で、失敗画像の顔の部分を置き換える画像合成を行う。   Hereinafter, preferred embodiments using a camera to which the present invention is applied will be described with reference to the drawings. A camera according to a preferred embodiment of the present invention is a digital camera, includes an imaging unit, converts a subject image into image data by the imaging unit, and converts the subject image into a main body based on the converted image data. Live view is displayed on the display unit placed on the back of the camera. The photographer determines the composition and the photo opportunity by observing the live view display. During the release operation, the image data is recorded in the recording unit. The image data recorded in the recording unit can be reproduced and displayed on the display unit when the reproduction mode is selected. In addition, when recording image data or reproducing recorded image data, if the face portion of the subject becomes a failed image due to backlight or the like, the face of the same person from the face database (DB) The image data is read out, the brightness is corrected so as not to cause a sense of incongruity with the surrounding brightness, and image synthesis is performed to replace the face portion of the failed image.

図1に示すブロック図を用いて、本発明の第1実施形態に係わるカメラ10の構成について説明する。カメラ10は、信号処理及び制御部1、撮像部2、顔検出部3、記録部4、ストロボ部5、操作判定部6、音声収録部7、表示部8、時計部9、フラッシュメモリ11、通信部12等から構成される。   The configuration of the camera 10 according to the first embodiment of the present invention will be described using the block diagram shown in FIG. The camera 10 includes a signal processing and control unit 1, an imaging unit 2, a face detection unit 3, a recording unit 4, a strobe unit 5, an operation determination unit 6, an audio recording unit 7, a display unit 8, a clock unit 9, a flash memory 11, The communication unit 12 is configured.

撮像部2は、撮影レンズ、シャッタ等の露出制御部、撮像素子、撮像素子の駆動及び読出回路等を含み、撮影レンズによって形成された被写体像を撮像素子によって画像データに変換し、これを出力する。なお、本明細書においては、画像データは、撮像素子から出力される画像信号に限らず、信号処理及び制御部1によって処理された画像データ、および記録部4に記録されている画像データ等についても使用する。   The imaging unit 2 includes an exposure control unit such as a photographic lens and a shutter, an imaging device, a driving and reading circuit for the imaging device, and the like. The subject image formed by the photographic lens is converted into image data by the imaging device and is output. To do. In this specification, the image data is not limited to the image signal output from the image sensor, but is the image data processed by the signal processing and control unit 1, the image data recorded in the recording unit 4, and the like. Also used.

信号処理及び制御部1は、CPU(Central Processing Unit:中央処理装置)およびその周辺のハードウエア回路によって構成され、フラッシュメモリ11に記憶されているプログラムに従ってカメラ10の全体のシーケンスを制御する。信号処理及び制御部1は、露出不良判定部1bを含む。露出不良判定部1bは、撮像部2から出力される画像データを分析し、被写体の顔が周囲よりも暗く露出不足になり黒つぶれ、または顔が周囲よりも明るく露出過剰となり白とびとなっているか否かを判定し、また被写体の顔の陰影を分析し、顔の中の一部分が暗くまたは明るいことにより露出不良になっているか否かを判定する。また、信号処理及び制御部1は、画像合成、顔部分のトリミング、補正処理等の種々の画像処理も行う。   The signal processing and control unit 1 includes a CPU (Central Processing Unit) and peripheral hardware circuits, and controls the entire sequence of the camera 10 according to a program stored in the flash memory 11. The signal processing and control unit 1 includes an exposure failure determination unit 1b. The poor exposure determination unit 1b analyzes the image data output from the imaging unit 2, and the subject's face is darker than the surroundings and underexposed and blacked out, or the face is brighter than the surroundings and overexposed and overexposed. And the shadow of the face of the subject is analyzed, and it is determined whether or not the exposure is poor because a part of the face is dark or bright. The signal processing and control unit 1 also performs various image processing such as image composition, face trimming, and correction processing.

顔検出部3は、撮像部2から出力される画像データに基づいて、被写体像の中に人物の顔が含まれているか否かを検出する。顔の検出は、画像内に人間の顔の特徴を有する陰影パターンがあるか否かに基づいて行う。顔が含まれていた場合には、その顔の位置、顔の大きさ、顔の数等の検出も行う。また、同一人であるか否かを判定するに必要な特徴点の抽出も行う。また、表情を判定するための目や口元の特徴や、顔の向きを判定するための鼻筋線27(図19参照)等の検出も行う。   The face detection unit 3 detects whether or not a person's face is included in the subject image based on the image data output from the imaging unit 2. Face detection is performed based on whether or not there is a shadow pattern having human face characteristics in the image. If a face is included, the position of the face, the size of the face, the number of faces, etc. are also detected. Also, feature points necessary for determining whether or not they are the same person are extracted. Further, the eyes and mouth characteristics for determining facial expressions, the nose lines 27 (see FIG. 19) for determining the orientation of the face, and the like are also detected.

記録部4は、カメラ本体に脱着自在な記録媒体、若しくは内蔵の記録媒体から構成される。記録部4には、撮像部2から出力され、信号処理及び制御部1によって画像処理された静止画や動画の画像データや、付随するデータが記録される。付随データとしては、顔検出部3によって検出された顔の位置、大きさ、数等や、また後述する時計部9から取得した撮影日時情報等がある。   The recording unit 4 includes a recording medium that can be attached to and detached from the camera body, or a built-in recording medium. The recording unit 4 records still image and moving image image data output from the imaging unit 2 and subjected to image processing by the signal processing and control unit 1, and accompanying data. The accompanying data includes the position, size, number, and the like of the face detected by the face detection unit 3 and shooting date / time information acquired from the clock unit 9 described later.

記録部4内の顔画像データベース(顔画像DB)4bには、家族や友人等の個人ごとに顔の画像データが記録されている。この顔画像DB4bを用いることにより、撮影画像内の顔画像のどの人かを特定することができる。また、顔画像DB4bに記憶されている画像データは、個人ごとに異なる向きの顔の画像データや異なる表情の顔の画像データが記録されている。露出不足と判定された顔画像に対して、この画像データの顔の部分に対して置き換え合成を行うことにより、失敗画像を復元することができる。上述の信号処理及び制御部1は、撮影画像の顔の部分と一致する人物の顔の画像を、この顔画像DB4bの中から検索可能である。   In the face image database (face image DB) 4b in the recording unit 4, face image data is recorded for each individual such as a family or a friend. By using this face image DB 4b, it is possible to specify which person in the face image in the photographed image. The image data stored in the face image DB 4b stores face image data with different orientations and face images with different facial expressions for each individual. A failed image can be restored by replacing and compositing the face portion of the image data for the face image determined to be underexposed. The signal processing and control unit 1 described above can search the face image DB 4b for a human face image that matches the face portion of the captured image.

時計部9は、計時機能を有し、また日時情報を出力する。撮影時には、前述したように日時情報が画像データと共に記録部4の記録媒体に記録される。操作判定部6は、カメラ10の外装に配置されたレリーズ釦、電源釦、再生釦、メニュー釦等の各種操作部材を有し、この操作部材の操作状態を判定し、この判定結果を画像処理及び制御部1に出力する。   The clock unit 9 has a time measuring function and outputs date / time information. At the time of shooting, as described above, the date / time information is recorded on the recording medium of the recording unit 4 together with the image data. The operation determination unit 6 includes various operation members such as a release button, a power button, a playback button, and a menu button arranged on the exterior of the camera 10, determines the operation state of the operation member, and performs image processing on the determination result. And output to the control unit 1.

表示部8は、信号処理及び制御部1に接続されており、本体の背面等に配置された液晶や有機EL等のモニタを有し、ライブビュー表示や、撮影時のレックビュー表示や、記録部4に記録されている記録画像の表示や、メニュー画面等の制御画面を表示する。   The display unit 8 is connected to the signal processing and control unit 1 and has a monitor such as a liquid crystal or an organic EL arranged on the back surface of the main body, and performs live view display, REC view display during recording, and recording. Display of recorded images recorded in the unit 4 and a control screen such as a menu screen are displayed.

ストロボ部5は、信号処理及び制御部1に接続されており、信号処理及び制御部1からの指令に応じて、被写体に対して補助照明を行う。信号処理及び制御部1は、撮影時の被写体が撮影に相応しい明るさや陰影状態となっていない場合に、補助照明の発光指令を行う。   The strobe unit 5 is connected to the signal processing and control unit 1, and performs auxiliary illumination on the subject in response to a command from the signal processing and control unit 1. The signal processing and control unit 1 issues a light emission command for auxiliary illumination when the subject at the time of shooting is not in a brightness or shade suitable for shooting.

音声収録部7は、マイクを有し、周囲の音声を音声信号に変換し、信号処理及び制御部1に出力する。動画の撮影時等に、画像データの記録と共に、音声データを記録するようにしてもよい。フラッシュメモリ11は、不揮発性の電気的に書き換え可能なメモリであり、信号処理及び制御部1によって実行されるプログラムを記憶しており、また、カメラ10の制御に必要な各種データも記憶する。なお、プログラム等を記憶可能であれば、フラッシュメモリに限らず、マスクROM等、他の記憶装置であってもよい。通信部12は、無線または有線によりパーソナルコンピュータ等の外部機器やアクセサリと通信を行い、またインターネット等を通じて外部サーバーとも通信を行う。   The audio recording unit 7 includes a microphone, converts ambient audio into an audio signal, and outputs the audio signal to the signal processing and control unit 1. Audio data may be recorded together with image data when shooting a moving image. The flash memory 11 is a nonvolatile electrically rewritable memory, stores a program executed by the signal processing and control unit 1, and also stores various data necessary for controlling the camera 10. In addition, as long as a program etc. can be memorize | stored, other memory | storage devices, such as not only a flash memory but mask ROM, may be sufficient. The communication unit 12 communicates with external devices and accessories such as a personal computer by wireless or wired communication, and also communicates with an external server through the Internet or the like.

次に、図2を用いて、本実施形態における失敗画像の補正および合成による復元について説明する。図2(a)は、カメラ10によって撮影された撮影画像の一例を示す。この例では、被写体A21は適正露出となっているが、後方にいる被写体B22は十分な明るさがないために、露出アンダーとなっている。この場合、被写体B22に対して、部分的に画像処理を行うことにより、被写体B22の顔の部分を識別できる程度に補正することができる。例えば、黒つぶれと言われる状態であっても、ヒストグラムにおける伸長化または平坦化を行うことにより、黒つぶれのない画像を得ることが可能である。同様に、被写体B22の顔の部分が非常に明るく白とびと言われる状態であっても同様の技術により補正が可能である。   Next, using FIG. 2, restoration by failure image correction and synthesis in the present embodiment will be described. FIG. 2A shows an example of a photographed image photographed by the camera 10. In this example, the subject A21 is properly exposed, but the subject B22 located behind is underexposed because it is not sufficiently bright. In this case, it is possible to correct the subject B22 so that the face portion of the subject B22 can be identified by performing partial image processing on the subject B22. For example, even in a state called blackout, it is possible to obtain an image without blackout by performing expansion or flattening in the histogram. Similarly, even if the face portion of the subject B22 is very bright and overexposed, it can be corrected by the same technique.

しかしながら、極度の黒つぶれの場合には、画像処理により補正を行っても、元の画像の情報量が少ないことから、図2(b)に示すようにノイズの多い画像となってしまう。このような場合、本実施形態においては、図2(c)に示すように、適正露出で撮影された被写体B22aの顔の部分の補完用参照データを用いて、被写体B22の顔の部分に対して、被写体B22の顔の部分を置き換える画像合成を行うようにしている。   However, in the case of extreme blackout, even if correction is performed by image processing, the amount of information in the original image is small, resulting in a noisy image as shown in FIG. In such a case, in this embodiment, as shown in FIG. 2C, the reference data for complementation of the face portion of the subject B22a photographed with appropriate exposure is used for the face portion of the subject B22. Thus, image composition for replacing the face portion of the subject B22 is performed.

すなわち、撮影画像においては、顔は主要な被写体であることが多く、他の部分より優先して露出やピントを合わせたいという要望がある。このため、近年の撮影装置は顔認識装置を搭載し、顔を認識し、露出やピントを合わせるようにしている。また、近年では、画像処理技術の進歩が著しく、元の撮影画像の一部分を他の画像に置き換える画像処理技術も種々提案されており、例えば、目を閉じている写真に対して、同一人の目の開いている画像をあてはめる画像処理が提案されている。また、アフィン変換による画像合成は一般的になってきており、顔画像への応用も提案されている。そこで、本実施形態においては、この顔認識と画像処理技術を利用し、露出不足であって、画像の明るさの補正によっては適正露出の画像が得られない場合には、画像合成により、顔の部分を置き換える画像合成を行うようにしている。   In other words, in a photographed image, the face is often the main subject, and there is a demand to prioritize exposure and focus over other parts. For this reason, recent photographing apparatuses are equipped with a face recognition device to recognize a face and adjust exposure and focus. In recent years, image processing technology has been remarkably advanced, and various image processing technologies for replacing a part of the original photographed image with another image have been proposed. Image processing for applying an image with open eyes has been proposed. In addition, image synthesis by affine transformation has become common, and application to face images has also been proposed. Therefore, in the present embodiment, using this face recognition and image processing technique, if the image is underexposed and an image with proper exposure cannot be obtained by correcting the brightness of the image, the image is synthesized by image synthesis. The image composition for replacing the part is performed.

図3(a)は、露光状態(明るさ)を示す輝度分布図であり、ある撮影画像の一例について、横軸に輝度値をとり、縦軸に明るさの度数をとっている。この図3(a)に示す撮影画像の一例はアンダー露出の場合であり、輝度値の低い(暗い)部分が多く、いわゆる黒つぶれとなっている。また、図3(b)は他の撮影画像の一例であり、オーバー露出の場合であり、輝度値の高い(明るい)部分が多く、いわゆる白とびとなっている状態である。   FIG. 3A is a luminance distribution diagram showing an exposure state (brightness), and for an example of a photographed image, the horizontal axis represents the luminance value and the vertical axis represents the frequency of brightness. An example of the photographed image shown in FIG. 3A is a case of underexposure, and there are many portions with low (dark) luminance values, so-called blackening. FIG. 3B is an example of another photographed image, which is a case of overexposure, in which there are many portions with high (bright) luminance values and so-called overexposure.

図3(a)(b)に示すような輝度分布の撮影画像は、撮影者の意図により、また被写体によっては必ずしも失敗写真とは言えない場合もあるが、人物やペット等を対象とした写真においては、殆どの場合が失敗写真と言える。失敗写真と言えるか否かの判定としては、本実施形態においては、黒つぶれの場合には、輝度値ゼロにおける度数U(図3(a)参照)を用いて判定する。また、白とびの場合には、最大輝度値における度数O(図3(b)参照)を用いて判定する。なお、図3(a)(b)に示す輝度分布図ではノイズによる誤判断のおそれがあることから、図4(a)(b)に示すように、輝度値幅を粗くしたヒストグラムを用いてもよい。   The photographed image with the luminance distribution as shown in FIGS. 3A and 3B may not necessarily be a failed photograph depending on the photographer's intention and depending on the subject, but the photograph is intended for a person, a pet, or the like. In most cases, it is a failure photo. In this embodiment, the determination as to whether or not the photograph can be a failed photograph is made using the frequency U (see FIG. 3A) at a luminance value of zero in the case of blackout. In the case of overexposure, determination is made using the frequency O (see FIG. 3B) at the maximum luminance value. In the luminance distribution diagrams shown in FIGS. 3 (a) and 3 (b), there is a risk of erroneous determination due to noise. Therefore, as shown in FIGS. 4 (a) and 4 (b), a histogram with a rough luminance value width may be used. Good.

次に、本実施形態における顔補正・合成の動作について、図5に示すフローチャートを用いて説明する。このフローチャートおよび後述するフローチャートは、フラッシュメモリ11に記憶されているプログラムに従って信号処理及び制御部1が実行する。この顔補正・合成のフローは、カメラ10が撮影を行い、画像データを記録部4に記録する際、または、記録済みの画像データを読出し再生表示を行う場合に実行する。   Next, the face correction / combination operation in this embodiment will be described with reference to the flowchart shown in FIG. This flowchart and a flowchart described later are executed by the signal processing and control unit 1 in accordance with a program stored in the flash memory 11. This flow of face correction / combination is executed when the camera 10 captures an image and records the image data in the recording unit 4 or when the recorded image data is read and displayed.

顔補正・合成のフローに入ると、まず、第1の顔部のヒストグラムを作成する(S1)。ここでは、画像データの中から、顔検出部3によって検出された顔の位置に対応する画像データを用いて、所定幅の輝度値ごとに度数を求め、ヒストグラムを作成する。顔が複数ある場合には、順次、顔の部分を選択してヒストグラムを生成する。   In the face correction / combination flow, first, a histogram of the first face is created (S1). Here, using the image data corresponding to the position of the face detected by the face detection unit 3 from the image data, the frequency is obtained for each luminance value of a predetermined width, and a histogram is created. When there are a plurality of faces, the face portions are sequentially selected to generate a histogram.

第1の顔部のヒストグラムを生成すると、次に、輝度値ゼロにおける度数Uが閾値Uthよりも大きいか否かの判定を行う(S3)。ここでは、露光不足であり、黒つぶれにより失敗画像となっているか否かを判定するために、度数Uと閾値Uthを比較し、度数Uが閾値Uthよりも大きい否かを判定する。従って、閾値Uthは露光不足で失敗画像といえるか否かを判定できる程度の値であればよい。   Once the first face histogram is generated, it is next determined whether or not the frequency U at the luminance value zero is larger than the threshold value Uth (S3). Here, in order to determine whether the image is underexposed and has failed due to blackout, the frequency U and the threshold Uth are compared to determine whether the frequency U is greater than the threshold Uth. Therefore, the threshold value Uth may be a value that can be used to determine whether the image is a failed image due to insufficient exposure.

ステップS3における判定の結果、度数Uが閾値Uthよりも大きかった場合には、被写体の第1の顔部が暗く、黒つぶれになっている。この場合には、次に、度数Uが極限値Ulimitよりも大きいか否かを判定する(S5)。極限値Ulimit>閾値Uthの関係があり、画像の明るさ補正により適正画像とすることができるか否かの判定を行う。   If the result of determination in step S3 is that the frequency U is greater than the threshold value Uth, the first face portion of the subject is dark and blackened. In this case, it is next determined whether or not the frequency U is larger than the limit value Ulimit (S5). There is a relationship of limit value Ulimit> threshold value Uth, and it is determined whether or not an appropriate image can be obtained by correcting the brightness of the image.

ステップS5における判定の結果、度数U≧極限値Ulimitでなかった場合には、黒つぶれ補正処理を行う(S7)。この場合は、閾値Uth<度数U<極限値Ulimitであり、被写体の第1の顔部は失敗画像といえるが、顔の部分の明るさを画像処理に適正な明るさに補正する所謂、黒つぶれの補正処理によって、適正画像とすることができる。   If the result of determination in step S5 is that the frequency U is not the limit value Ulimit, a blackout correction process is performed (S7). In this case, the threshold value Uth <frequency U <limit value Ulimit and the first face part of the subject can be said to be a failed image, but the so-called black color which corrects the brightness of the face part to a brightness appropriate for image processing. An appropriate image can be obtained by the correction processing for collapse.

一方、ステップS5における判定の結果、度数U≧極限値Ulimitであった場合には、次に、同一人物の顔画像がある否かの判定を行う(S9)。この場合は、閾値Uth<極限値Ulimit≦度数Uであり、被写体は失敗画像であり、しかも極度の黒つぶれであって顔の陰影が殆どないことから、黒つぶれ補正処理によっては、適正画像とすることができない。そこで、画像の内の第1の顔部を、顔画像DB4bに記録されている同一人の顔部に置き換える画像合成を行う。このステップS9においては、顔画像DB4bを検索し、同一人の顔部の補完用参照データが顔画像DB4bに記録されているかを判定する。   On the other hand, if the result of determination in step S5 is that the frequency U ≧ the limit value Ulimit, it is next determined whether or not there is a face image of the same person (S9). In this case, the threshold value Uth <the limit value Ulimit ≦ the frequency U, the subject is a failed image, and the image is extremely dark and has almost no shadow on the face. Can not do it. Therefore, image synthesis is performed in which the first face portion in the image is replaced with the face portion of the same person recorded in the face image DB 4b. In step S9, the face image DB 4b is searched, and it is determined whether or not the reference data for complementing the face portion of the same person is recorded in the face image DB 4b.

ステップS9における判定の結果、同一人物の顔画像が有った場合には、次に、第1の顔部の補正・合成処理を行う(S11)。ここでは、図2に示した例では、被写体B22の顔の部分を、同一人の被写体B22a顔の部分の補完用参照データに置き換える。ただし、被写体B22aの顔の明るさは適正露光であり、そのまま、顔の部分を置き換えると、周囲の明るさと大きく異なり違和感が生ずる。そこで、本実施形態においては、背景の明るさよりも所定段数だけ明るくなる程度に顔の明るさを補正する。補完用参照データに基づく顔部の明るさを補正すると、もとの撮影画像の第1の顔部と置き換える画像合成を行う。なお、顔画像に補正を施してから画像合成を行う以外にも、先に顔画像を合成し、合成後、顔画像とその周辺の画像の露出差が目立たないように画像を補正するようにしてもよい。   If the result of determination in step S9 is that there is a face image of the same person, next, correction and composition processing for the first face is performed (S11). Here, in the example shown in FIG. 2, the face portion of the subject B22 is replaced with the complementary reference data of the face portion of the subject B22a of the same person. However, the brightness of the face of the subject B22a is appropriate exposure. If the face part is replaced as it is, the brightness of the face is greatly different from that of the surroundings, and an uncomfortable feeling is generated. Therefore, in the present embodiment, the brightness of the face is corrected so that it is brighter by a predetermined number of steps than the brightness of the background. When the brightness of the face based on the complementary reference data is corrected, image synthesis is performed to replace the first face of the original captured image. In addition to performing the image synthesis after correcting the face image, the face image is synthesized first, and after the synthesis, the image is corrected so that the exposure difference between the face image and the surrounding image is not noticeable. May be.

ステップS3における判定の結果、度数Uが閾値Uthよりも大きくなかった場合には、次に、最大輝度値における度数Oが閾値Othよりも大きいか否かの判定を行う(S21)。ここでは、第1の顔部が露光オーバーであり、失敗画像となっているか否かを判定するために、度数Oと閾値Othを比較し、度数Oが閾値Othよりも大きい否かを判定する。従って、閾値Othは露光オーバーで失敗画像といえるか否かを判定できる程度の値であればよい。   If the result of determination in step S3 is that the frequency U is not greater than the threshold value Uth, it is next determined whether or not the frequency O at the maximum luminance value is greater than the threshold value Oth (S21). Here, in order to determine whether or not the first face is overexposed and a failed image, the frequency O is compared with the threshold value Oth, and it is determined whether the frequency O is greater than the threshold value Oth. . Accordingly, the threshold value Oth may be a value that can be used to determine whether or not the image is a failed image due to overexposure.

ステップS21における判定の結果、度数Oが閾値Othよりも大きかった場合には、被写体の第1の顔部が明るくなっており、露光オーバーの状態である。この場合には、次に、度数Oが極限値Olimitよりも大きいか否かを判定する(S23)。なお、極限値Olimitは、閾値Oth<極限値Olimitの関係があり、度数O<極限値Olimitであれば、第1の顔部の明るさ補正により適正画像とすることができる。   If the result of determination in step S21 is that the frequency O is greater than the threshold value Oth, the first face of the subject is bright and overexposed. In this case, it is next determined whether or not the frequency O is larger than the limit value Olimit (S23). The limit value Olimit has a relationship of threshold value Oth <limit value Olimit. If the frequency O <limit value Olimit, an appropriate image can be obtained by correcting the brightness of the first face.

ステップS23における判定の結果、度数O≧極限値Olimitでなかった場合には、次に、白とび補正処理を行う(S25)。この場合は、閾値Oth<度数O<極限値Olimitであり、被写体の第1の顔部は失敗画像といえるが、顔部の明るさを画像処理に適正な明るさに補正する所謂、白とび補正処理によって、適正画像とすることができる。   If the result of determination in step S <b> 23 is that frequency O ≧ limit value Olimit is not satisfied, overexposure correction processing is next performed (S <b> 25). In this case, the threshold value Oth <the frequency O <the limit value Olimit, and the first face portion of the subject can be said to be a failed image. However, the so-called overexposure that corrects the brightness of the face portion to a brightness appropriate for image processing. An appropriate image can be obtained by the correction process.

一方、ステップS23における判定の結果、度数O≧極限値Olimitであった場合には、次に、ステップS9と同様に、第1の顔部と同一人物の顔画像がある否かの判定を行う(S27)。この場合は、閾値Oth<極限値Olimit≦度数Oであり、被写体の第1の顔部は失敗画像であり、しかも極度の白とびであって顔の陰影が殆どないことから、画像処理によっては、適正画像とすることができない。そこで、画像の内の顔の部分を、顔画像DB4bに記録されている同一人の顔に置換する画像合成を行う。このステップS27においては、同一人の顔の部分の補完用参照データが顔画像DB4bに記録されているか否かを判定する。   On the other hand, if the result of determination in step S23 is that frequency O ≧ limit value Olimit, next, as in step S9, it is determined whether there is a face image of the same person as the first face. (S27). In this case, the threshold value Oth <the limit value Olimit ≦ the frequency O, and the first face portion of the subject is a failed image, and the image is extremely white and has almost no shadow on the face. It cannot be a proper image. Therefore, image synthesis is performed in which the face portion in the image is replaced with the face of the same person recorded in the face image DB 4b. In this step S27, it is determined whether or not the complementary reference data for the face portion of the same person is recorded in the face image DB 4b.

ステップS27における判定の結果、同一人物の顔画像が有った場合には、次に、第1の顔部の補正・合成処理を行う(S29)。ここでは、失敗画像となった顔の部分について、同一人の被写体B22aの顔の部分の補完用参照データに置き換える。ステップS11の場合と同様、そのまま、顔の部分を置き換えると、顔部の背景の明るさと大きく異なり違和感が生ずることから、画像補正を行う。画像補正としては、背景の明るさよりも所定段数だけ暗くすればよい。補完用参照データに基づく顔部の明るさを補正すると、もとの撮影画像の第1の顔部と置き換える画像合成を行う。なお、顔画像に補正を施してから画像合成を行う以外にも、先に顔画像を合成し、合成後、顔画像とその周辺の画像の露出差が目立たないように画像を補正するようにしてもよい。   If the result of determination in step S27 is that there is a face image of the same person, then first face portion correction / combination processing is performed (S29). Here, the face portion that has become the failed image is replaced with the complementary reference data for the face portion of the subject B22a of the same person. As in the case of step S11, if the face part is replaced as it is, the background brightness of the face part is greatly different from the brightness of the face part, resulting in a sense of incongruity. The image correction may be made darker by a predetermined number of steps than the background brightness. When the brightness of the face based on the complementary reference data is corrected, image synthesis is performed to replace the first face of the original captured image. In addition to performing the image synthesis after correcting the face image, the face image is synthesized first, and after the synthesis, the image is corrected so that the exposure difference between the face image and the surrounding image is not noticeable. May be.

ステップS7、S11における処理を行うと、またはステップS9における判定の結果、同一人物の顔画像がなかった場合には、またはステップS25、S29における処理を行うと、またはステップS27における判定の結果、同一人物の顔画像がなかった場合には、顔補正・合成の処理を終了する。なお、撮影画像の中に複数の顔の部分が含まれている場合には、第2の顔部、第3の顔部と、順次顔部を選択して、顔補正・合成のフローを実行する。   When the processes in steps S7 and S11 are performed, or when the result of determination in step S9 is that there is no face image of the same person, or when the processes in steps S25 and S29 are performed, or the determination results in step S27 are the same. If there is no human face image, the face correction / combination processing is terminated. When a plurality of face parts are included in the photographed image, the second face part, the third face part, and the face part are sequentially selected, and the face correction / composition flow is executed. To do.

このように、本発明の第1実施形態においては、顔の部分が黒つぶれ、または白とびのために適正露光となっていなかった場合には、顔部の補正処理により、適正画像とする。しかし、補正処理によって適正画像とすることができない場合には(ステップS5→Yes、S23→Yesの場合)、顔画像DB4bに記録されている補完用参照データを用いて、顔の部分を置換する画像合成を行うようにしている(S11、S29)。このため、逆光等、輝度差が大きい状況において失敗した撮影画像を簡単に復元することができる。特に、輝度差がそれほど大きくない場合には、黒つぶれ補正処理、又は白とび補正処理によって撮影画像を活かして補正を行うようにしている。また、輝度差が大きい場合であっても、顔画像の置換による画像合成を行うようにしているので、厳しい撮影条件の場合であっても、失敗画像を復元することができる。   As described above, in the first embodiment of the present invention, when the face portion is not properly exposed due to blackening or overexposure, an appropriate image is obtained by correcting the face portion. However, if the correct image cannot be obtained by the correction process (step S5 → Yes, S23 → Yes), the face portion is replaced using the complementary reference data recorded in the face image DB 4b. Image composition is performed (S11, S29). For this reason, it is possible to easily restore a captured image that has failed in a situation where the brightness difference is large, such as backlight. In particular, when the luminance difference is not so large, correction is performed using the captured image by the blackout correction process or the overexposure correction process. In addition, even when the luminance difference is large, the image composition is performed by replacing the face image, so that the failed image can be restored even under severe shooting conditions.

なお、ステップS9またはS27においては、同一人の顔画像が顔画像DB4bに記録されているか否かを判定したが、これに限らず、顔の向き、顔部の画素数、露出やピント状態等、画像合成に適した顔画像があるか否かについても判定するルーチンを挿入するようにしてもよい。さらに、画像合成に適した顔画像の候補が複数ある場合には、顔の向き、表情、輝度、ピント等を勘案して最適の候補を判断するルーチンを挿入するようにしてもよい。   In step S9 or S27, it is determined whether or not the face image of the same person is recorded in the face image DB 4b. However, the present invention is not limited to this, and the orientation of the face, the number of pixels of the face portion, exposure, focus state, etc. A routine for determining whether or not there is a face image suitable for image synthesis may be inserted. Further, when there are a plurality of face image candidates suitable for image synthesis, a routine for determining an optimum candidate may be inserted in consideration of the face direction, facial expression, brightness, focus, and the like.

次に、本発明の第1実施形態の変形例について、図6および図7を用いて説明する。第1実施形態においては、黒つぶれや白とびの程度を、度数Uまたは度数Oを用いて評価していた。これに対して、本変形例においては、黒つぶれの程度を、図6(a)に示すように、輝度値ゼロから所定の度数N以上の度数を有するまでの幅ΔEuを用いて判定するようにしている。また、白とびの程度は、図6(b)に示すように、輝度最大値から所定の度数N以上の幅ΔEoを用いて判定するようにしている。   Next, a modification of the first embodiment of the present invention will be described with reference to FIGS. In the first embodiment, the degree of underexposure or overexposure is evaluated using the frequency U or the frequency O. On the other hand, in the present modification, the degree of black crushing is determined using a width ΔEu from a luminance value of zero to a predetermined frequency N or more as shown in FIG. 6A. I have to. Further, as shown in FIG. 6B, the degree of overexposure is determined using a width ΔEo of a predetermined frequency N or more from the maximum luminance value.

本変形例における顔補正・合成の動作を、図7に示すフローチャートを用いて説明する。このフローチャートにおいて、図5に示すフローチャートと同一の処理を行うステップには、同一のステップ番号を付し、詳しい説明は省略する。   The face correction / combination operation in this modification will be described with reference to the flowchart shown in FIG. In this flowchart, steps that perform the same processing as in the flowchart shown in FIG. 5 are given the same step numbers, and detailed descriptions thereof are omitted.

図7に示すフローに入ると、まず、第1の顔部のヒストグラムの作成を行う(S1)。続いて、輝度値ゼロから所定の度数N以上の度数を有するまでの幅ΔEuが閾値ΔEuthよりも大きいか否かの判定を行う(S4)。ここでは、第1の顔部が露光不足であり、失敗画像となっているか否かを判定するために、幅ΔEuと閾値Uuthを比較し、幅ΔEuが閾値Uuthよりも大きい否かを判定する。従って、閾値Uuthは露光不足により黒つぶれとなり失敗画像といえるか否かを判定できる程度の値であればよい。   In the flow shown in FIG. 7, first, a histogram of the first face is created (S1). Subsequently, it is determined whether or not the width ΔEu from the luminance value zero to the predetermined frequency N or more is larger than the threshold value ΔEuth (S4). Here, in order to determine whether or not the first face is underexposed and has become a failed image, the width ΔEu is compared with the threshold value Uuth to determine whether the width ΔEu is greater than the threshold value Uuth. . Therefore, the threshold value Uuth may be a value that can be used to determine whether or not it is a failed image due to blackout due to insufficient exposure.

ステップS4における判定の結果、幅ΔEuが閾値Euthよりも小さかった場合には、次に、幅ΔEuが極限値Eulimitよりも小さいか否かを判定する(S6)。閾値Euth>極限値Eulimitの関係があり、顔の部分の明るさを補正することにより適正画像にすることができるか否かを判定する。ステップS6における判定の結果、極限値Eulimit≧幅ΔEuでなかった場合には、次に、黒つぶれ補正処理を行う(S7)。顔の部分の明るさを黒つぶれ補正処理によって、適正画像にする。   If the result of determination in step S4 is that the width ΔEu is smaller than the threshold Euth, it is next determined whether or not the width ΔEu is smaller than the limit value Eulimit (S6). It is determined whether or not an appropriate image can be obtained by correcting the brightness of the face portion because there is a relationship of threshold value Euth> limit value Eulimit. If the result of determination in step S6 is that the limit value Eulimit ≧ width ΔEu is not satisfied, a blackout correction process is performed (S7). The brightness of the face part is adjusted to an appropriate image by the blackout correction process.

ステップS6における判定の結果、極限値Eulimit≧幅ΔEuであった場合には、第1実施形態の場合と同様に、次に、同一人物の顔画像がある否かの判定を行う(S9)。この場合は、被写体の第1顔部は失敗画像であり、しかも顔の陰影が殆どないことから、撮影画像の顔の部分を、顔画像DB4bに記録されている同一人の顔に置換する画像合成を行う。   As a result of the determination in step S6, if the limit value Eulimit ≧ width ΔEu, as in the case of the first embodiment, it is next determined whether or not there is a face image of the same person (S9). In this case, since the first face portion of the subject is a failure image and there is almost no shadow of the face, an image in which the face portion of the photographed image is replaced with the face of the same person recorded in the face image DB 4b. Perform synthesis.

ステップS9における判定の結果、同一人物の顔画像が有った場合には、次に、第1実施形態と同様に、第1の顔部の補正・合成処理を行う(S11)。ここでは、被写体の顔の部分を、同一人の被写体B22aの補完用参照データに置き換える。画像補正としては、画面全体の背景の明るさよりも所定段数だけ明るくすればよい。なお、顔画像に補正を施してから画像合成を行う以外にも、先に顔画像を合成し、合成後、顔画像とその周辺の画像の露出差が目立たないように画像を補正するようにしてもよい。   If the result of determination in step S9 is that there is a face image of the same person, next, as in the first embodiment, correction / combination processing of the first face is performed (S11). Here, the face portion of the subject is replaced with the complementary reference data of the subject B22a of the same person. The image correction may be performed by a predetermined number of steps higher than the background brightness of the entire screen. In addition to performing the image synthesis after correcting the face image, the face image is synthesized first, and after the synthesis, the image is corrected so that the exposure difference between the face image and the surrounding image is not noticeable. May be.

ステップS4における判定の結果、幅ΔEoが閾値Eothよりも小さくなかった場合には、次に、輝度最大値から所定の度数N以上の幅ΔEoが閾値Eothよりも小さいか否かの判定を行う(S22)。ここでは、露光オーバーであり、失敗画像となっているか否かを判定するために、幅ΔEoと閾値Eothを比較し、幅ΔEoが閾値Eothよりも小さいか否かを判定する。従って、閾値Eothは露光オーバーで失敗画像といえるか否かを判定できる程度の値であればよい。   If the result of determination in step S4 is that the width ΔEo is not smaller than the threshold Eoth, it is next determined whether or not the width ΔEo greater than or equal to a predetermined frequency N from the maximum luminance value is smaller than the threshold Eoth ( S22). Here, in order to determine whether the image is overexposed and a failed image, the width ΔEo is compared with the threshold Eoth to determine whether the width ΔEo is smaller than the threshold Eoth. Therefore, the threshold Eoth may be a value that can be used to determine whether or not the image is a failed image due to overexposure.

ステップS22における判定の結果、幅ΔEoが閾値Eothよりも小さかった場合には、顔の部分が明るくなっており、露光オーバーの状態である。この場合には、次に、幅ΔEoが極限値Eolimitよりも小さいか否かを判定する(S24)。なお、極限値Eolimitは、極限値Eolimit<閾値Eothの関係があり、極限値Eolimit<幅ΔEoth<閾値Eothであれば、画像の顔の部分の明るさ補正により適正画像とすることができる。   If the result of determination in step S22 is that the width ΔEo is smaller than the threshold value Eoth, the face portion is bright and the overexposed state. In this case, it is next determined whether or not the width ΔEo is smaller than the limit value Eolimit (S24). The limit value Eolimit has a relationship of limit value Eolimit <threshold value Eoth, and if limit value Eolimit <width ΔEoth <threshold value Eoth, an appropriate image can be obtained by correcting the brightness of the face portion of the image.

ステップS24における判定の結果、極限値Eolimit≧幅ΔEoでなかった場合には、次に、第1実施形態と同様に、白とび補正処理を行う(S25)。この場合は、極限値Eolimit<幅ΔEoth<閾値Eothであり、被写体の第1の顔部は失敗画像といえるが、白とび補正処理によって、適正画像とすることができる。   If the result of determination in step S24 is that the limit value Eolimit is not greater than the width ΔEo, next, overexposure correction processing is performed as in the first embodiment (S25). In this case, limit value Eolimit <width ΔEoth <threshold value Eoth, and the first face portion of the subject can be said to be a failed image, but can be made an appropriate image by the overexposure correction process.

ステップS24における判定の結果、極限値Eolimit≧幅ΔEoであった場合には、次に、第1実施形態と同様に、同一人物の顔画像がある否かの判定を行う(S27)。ここでは、同一人の顔の部分の補完用参照データが顔画像DB4bに記録されているか否かを判定する。   If the result of determination in step S24 is that limit value Eolimit ≧ width ΔEo, it is next determined whether there is a face image of the same person as in the first embodiment (S27). Here, it is determined whether or not the complementary reference data for the face portion of the same person is recorded in the face image DB 4b.

ステップS27における判定の結果、同一人物の顔画像が有った場合には、次に、第1実施形態と同様に、第1の顔部の補正・合成処理を行う(S29)。ここでは、失敗画像となった顔の部分について、同一人の被写体B22aの顔の部分の補完用参照データに置き換える。第1実施形態の場合と同様、そのまま、顔の部分を置き換えると、周囲の明るさと大きく異なり違和感が生ずることから、画像補正を行う。画像補正としては、画面全体の背景の明るさよりも所定段数だけ暗くすればよい。なお、顔画像に補正を施してから画像合成を行う以外にも、先に顔画像を合成し、合成後、顔画像とその周辺の画像の露出差が目立たないように画像を補正するようにしてもよい。   If the result of determination in step S27 is that there is a face image of the same person, next, as in the first embodiment, correction / combination processing of the first face is performed (S29). Here, the face portion that has become the failed image is replaced with the complementary reference data for the face portion of the subject B22a of the same person. As in the case of the first embodiment, if the face portion is replaced as it is, the image is corrected because it is greatly different from the surrounding brightness and uncomfortable. The image correction may be made darker by a predetermined number of steps than the background brightness of the entire screen. In addition to performing the image synthesis after correcting the face image, the face image is synthesized first, and after the synthesis, the image is corrected so that the exposure difference between the face image and the surrounding image is not noticeable. May be.

ステップS7、S11における処理を行うと、またはステップS9における判定の結果、同一人物の顔画像がなかった場合には、またはステップS25、S29における処理を行うと、またはステップS27における判定の結果、同一人物の顔画像がなかった場合には、顔補正・合成の処理を終了する。なお、撮影画像の中に複数の顔の部分が含まれている場合には、第2の顔部、第3の顔部と、順次顔部を選択して、顔補正・合成のフローを実行する。   When the processes in steps S7 and S11 are performed, or when the result of determination in step S9 is that there is no face image of the same person, or when the processes in steps S25 and S29 are performed, or the determination results in step S27 are the same. If there is no human face image, the face correction / combination processing is terminated. When a plurality of face parts are included in the photographed image, the second face part, the third face part, and the face part are sequentially selected, and the face correction / composition flow is executed. To do.

このように、本発明の第1実施形態の変形例においては、顔画像の部分の黒つぶれや白とびの状態を、輝度値ゼロから所定の度数N以上の度数を有するまでの幅ΔEuや、輝度最大値から所定の度数N以上の幅ΔEoを用いて判定するようにしている。第1実施形態や変形例に示した度数や幅以外であっても、黒つぶれや白とび等の明るさによる失敗画像を判定することができる指標であれば、本発明の実施形態に適用することができる。   As described above, in the modified example of the first embodiment of the present invention, the state of the blacked out or overexposed state of the face image portion is expressed by the width ΔEu from the luminance value zero to the predetermined frequency N or more, The determination is made using the width ΔEo of a predetermined frequency N or more from the maximum luminance value. Any index other than the frequency and width shown in the first embodiment and the modification may be applied to the embodiment of the present invention as long as it is an index that can determine a failed image due to brightness such as blackout or overexposure. be able to.

なお、第1実施形態や変形例においては、顔の部分の画像データのヒストグラム分析を行うにあたって、顔全体の画像データを使用していた。しかし、これに限らず、顔の中の一部分を選択的に使用するようにしてもよい。例えば、黒髪の部分を除き、黒つぶれや白とびの影響を避けたい部分(例えば、目の周り)のみの画像データを用いてヒストグラム分析を行うようにしても構わない。   In the first embodiment and the modification, the image data of the entire face is used when performing histogram analysis of the image data of the face portion. However, the present invention is not limited to this, and a part of the face may be selectively used. For example, the histogram analysis may be performed using image data of only a portion (for example, around the eyes) where it is desired to avoid the influence of blackout or overexposure except for the black hair portion.

次に、本発明の第2実施形態について、図8ないし図21を用いて説明する。第2実施形態も第1実施形態と同様に、黒つぶれや白とびによって失敗画像となった場合には、画像処理によって適正画像に復元するが、画像の陰影に関する情報が失われ画像処理によって適正画像に復元できない場合には、顔画像DB4bに記録されている補完用参照データの顔画像を合成することによって適正画像を復元するようにしている。また、第1実施形態においては、ステップS11、S29において、顔部の合成処理を行う際に、周囲の明るさを考慮し、顔部の明るさを補正していたが、第2実施形態においては、顔部の明るさの具体的な補正方法についても説明する。本実施形態における構成は、図1に示したブロック図と同様であるので、詳しい説明は省略する。   Next, a second embodiment of the present invention will be described with reference to FIGS. Similarly to the first embodiment, when the second embodiment becomes a failed image due to blackout or overexposure, the image is restored to an appropriate image by image processing. If the image cannot be restored, the appropriate image is restored by synthesizing the face image of the complementary reference data recorded in the face image DB 4b. In the first embodiment, the facial brightness is corrected in consideration of the ambient brightness when performing the facial composition processing in steps S11 and S29. In the second embodiment, the facial brightness is corrected. Describes a specific method for correcting the brightness of the face. The configuration in this embodiment is the same as the block diagram shown in FIG.

本実施形態における撮影画像の適正画像への復元処理について、図8ないし図11を用いて説明する。図8(a)は、撮影画面の左側は十分に光があたっているが、右側は逆光やストロボ光の配光や発光量の制約により十分に光があたっていない場合を示す。このため、被写体A21に対しては十分な光があたり適正露光となったものの、被写体B22に対しては、十分な光があたらず、失敗写真となった例を示す。被写体B22の顔の部分が良く見えない場合には、本実施形態においては、図8(b)に示すように、被写体B22の顔画像22aを顔画像DB4bから類似の表情の画像を探し、顔の部分を切出し、顔の部分を置き換える画像合成を行う。この場合、切り出した顔の部分をそのまま合成すると、背景の明るさとマッチせず、不自然になることから、背景の明るさに調和するように顔画像22bを補正してから、画像合成を行う。   Processing for restoring a captured image to an appropriate image in the present embodiment will be described with reference to FIGS. FIG. 8A shows a case in which the left side of the photographing screen is sufficiently illuminated, but the right side is not sufficiently illuminated due to backlight or strobe light distribution or emission amount restrictions. For this reason, an example is shown in which the subject A21 is exposed to sufficient light to achieve appropriate exposure, but the subject B22 is not exposed to sufficient light, resulting in a failed photo. If the face portion of the subject B22 cannot be seen well, in the present embodiment, as shown in FIG. 8B, the face image 22a of the subject B22 is searched for an image with a similar expression from the face image DB 4b, The image composition is cut out and the face portion is replaced. In this case, if the extracted face part is synthesized as it is, it does not match the brightness of the background and becomes unnatural. Therefore, the face image 22b is corrected to harmonize with the brightness of the background, and then image synthesis is performed. .

図8(b)に示す画像合成について、図9(a)(b)を用いて説明する。図9(a)は、図8(a)におけるY=Y1の直線状で得られた輝度分布を示す。被写体B22の顔部は、被写体A21の顔部付近の背景の明るさに対して極度に暗く、よく顔が見ることができない。そこで、本実施形態においては、図9(b)に示すように、顔画像DB4bから読み出した補完用参照データの顔画像に置き換える画像合成を行う。この場合、背景の明るさよりも、顔の部分の明るさを、元の被写体B22の顔部の平均輝度と背景輝度の輝度差ΔEFの半分(ΔEF/2)程度、画面全体の背景の輝度よりも低下させるような画像処理を施す。顔部の明るさを、背景の明るさを考慮して調整しているので、自然な感じの画像合成となる。なお、本実施形態では、補正量として、元の被写体B22の顔部の平均輝度と背景輝度の輝度差ΔEFの半分(ΔEF/2)程度を採用している。このように、半分程度とすることにより、背景画像と顔画像の調和をとることが可能となる。しかし、半分に限らず、3分の1程度でも、また3分の2程度にしても構わない。   The image composition shown in FIG. 8B will be described with reference to FIGS. FIG. 9A shows a luminance distribution obtained in a straight line shape of Y = Y1 in FIG. The face of the subject B22 is extremely dark with respect to the brightness of the background near the face of the subject A21, and the face cannot be seen well. Therefore, in the present embodiment, as shown in FIG. 9B, image synthesis is performed to replace the face image of the complementary reference data read from the face image DB 4b. In this case, the brightness of the face rather than the brightness of the background is about half of the brightness difference ΔEF between the average brightness of the face of the original subject B22 and the background brightness (ΔEF / 2), and the brightness of the background of the entire screen. Image processing is also performed. Since the brightness of the face is adjusted in consideration of the brightness of the background, the image synthesis is natural. In the present embodiment, the correction amount is about half (ΔEF / 2) of the luminance difference ΔEF between the average luminance of the face of the original subject B22 and the background luminance. In this way, by setting the ratio to about half, the background image and the face image can be harmonized. However, it is not limited to half and may be about one third or about two thirds.

図10(a)は、被写体B22の顔の半分に光が十分あたっているが、残りの半分が影になっている場合を示す。このような状況は、強い日差しや照明下で起こり得る。このような場合には、影の領域に人物が存在しないと思って、画像鑑賞時に見過ごしてしまうことがある。そこで、本実施形態においては、図10(b)に示すように、被写体B22の顔の部分を、顔画像DB4bに記録されている顔画像の中から同一人物の顔画像22aを検索し、この顔画像と置換する画像合成を行う。このときも、そのまま画像合成を行うと、違和感のある画像となることから、周囲の明るさを考慮し、さらに顔画像の輝度分布の変化を緩やかするような補正を顔画像22bに施し、画像合成を行う。   FIG. 10A shows a case where light is sufficiently applied to half of the face of the subject B22, but the other half is shaded. Such a situation can occur under strong sunlight or lighting. In such a case, it may be overlooked when viewing the image, assuming that there is no person in the shadow area. Therefore, in the present embodiment, as shown in FIG. 10B, the face portion of the subject B22 is searched for the face image 22a of the same person from the face images recorded in the face image DB 4b. Perform image composition to replace the face image. At this time, if the image synthesis is performed as it is, an uncomfortable image is obtained. Therefore, the facial image 22b is corrected so as to moderate the change in the luminance distribution of the facial image in consideration of ambient brightness. Perform synthesis.

図10(b)で示す画像合成について、図11(a)(b)を用いて説明する。図11(a)は、図10(a)におけるY=Y1の直線状で得られた輝度分布を示す。被写体B22の顔部は、明暗差ΔEFが大きく、よく顔が見ることができない。そこで、本実施形態においては、図11(b)に示すように、顔画像DB4bから読み出した補完用参照データの顔画像の明暗差を、明暗差ΔEFの1/2となるように補正を施した後に、この補正した顔画像を元の顔画像と置き換える画像合成を行う。   The image composition shown in FIG. 10B will be described with reference to FIGS. 11A and 11B. FIG. 11A shows a luminance distribution obtained in a straight line shape with Y = Y1 in FIG. The face portion of the subject B22 has a large brightness difference ΔEF, and the face cannot be seen well. Therefore, in the present embodiment, as shown in FIG. 11B, the brightness difference of the face image of the complementary reference data read from the face image DB 4b is corrected so as to be 1/2 of the brightness difference ΔEF. Then, image synthesis is performed to replace the corrected face image with the original face image.

カメラ10の撮影時における露出量では、被写体B22の顔の部分の輝度差が大きくなってしまう。しかし、本実施形態によれば、輝度差を半分にしているので、被写体B22の顔を観察し易くなる。また、顔の明るい部分が背景の明るさと略一致するように、顔画像DB4bから読み出した補完用参照データの顔の部分の明るさを補正するので、周囲の明るさとマッチし、自然な感じの画像となる。   With the exposure amount at the time of shooting by the camera 10, the luminance difference of the face portion of the subject B22 becomes large. However, according to the present embodiment, since the luminance difference is halved, it is easy to observe the face of the subject B22. In addition, since the brightness of the face portion of the reference data for complementing read from the face image DB 4b is corrected so that the bright portion of the face substantially matches the brightness of the background, it matches with the surrounding brightness and has a natural feeling. It becomes an image.

次に、本実施形態における顔補正・合成の動作について、図12に示すフローチャートを用いて説明する。このフローチャートも、フラッシュメモリ11に記憶されているプログラムに従って信号処理及び制御部1が実行する。また、第1実施形態と同様に、顔補正・合成のフローは、カメラ10が撮影を行い、画像データを記録部4に記録する際、または、記録済みの画像データを読出し再生表示を行う場合に実行する。   Next, face correction / combination operations in this embodiment will be described with reference to the flowchart shown in FIG. This signal processing is also executed by the signal processing and control unit 1 in accordance with a program stored in the flash memory 11. As in the first embodiment, the face correction / combination flow is performed when the camera 10 captures an image and records the image data in the recording unit 4 or when the recorded image data is read and displayed. To run.

顔補正・合成のフローに入ると、まず、失敗顔部判定を行う(S101)。ここでは、顔検出部3によって顔画像が含まれているか否かを検出する。この検出の結果、顔画像が検出された場合には、信号処理及び制御部1は、顔画像ごとに、十分な光があたっておらず、適正露光になっていない失敗画像となっているか否かを判定する。この失敗顔部判定の詳細な動作については、図13を用いて後述する。   If the flow for face correction / combination is entered, first, a failed face portion is determined (S101). Here, the face detection unit 3 detects whether or not a face image is included. If a face image is detected as a result of this detection, the signal processing and control unit 1 determines whether the face image is a failed image that is not exposed to sufficient light and is not properly exposed. Determine whether. The detailed operation of the failed face determination will be described later with reference to FIG.

失敗顔部判定を行うと、次に、失敗顔部が有るか否かの判定を行う(S103)。ここでは、ステップS101において行った失敗顔部判定の結果に従って判定する。この判定の結果、失敗部顔が有った場合には、次に、補正が可能か否かの判定を行う(S105)。第1実施形態において説明したように、画像に陰影が十分ある場合には、陰影を保ったまま、画像が明るく(または暗く)なるように画像処理を施すことにより適正画像に復元することができる。そこで、このステップS105において、補正処理が可能か否かを判定する。   Once the failed face portion determination has been carried out, it is next determined whether or not there is a failed face portion (S103). Here, the determination is made according to the result of the failed face determination performed in step S101. If the result of this determination is that there is a failed face, it is next determined whether or not correction is possible (S105). As described in the first embodiment, when the image has sufficient shadow, it can be restored to an appropriate image by performing image processing so that the image becomes bright (or dark) while maintaining the shadow. . In step S105, it is determined whether correction processing is possible.

ステップS105における判定の結果、補正が可能であった場合には、補正処理を行う(S107)。ここでは、背景光の明るさのレベルに応じて、信号処理及び制御部1が画像データの増幅率を変更し、顔の部分が適正となるようにした適正画像に復元する。   If the result of determination in step S105 is that correction is possible, correction processing is performed (S107). Here, the signal processing and control unit 1 changes the amplification factor of the image data according to the brightness level of the background light, and restores the appropriate image so that the face portion is appropriate.

ステップS105における判定の結果、補正が可能でなかった場合には、次に、顔特定可能か否かの判定を行う(S109)。顔の部分が、黒つぶれや白とびによって、目鼻等の陰影を認識することができない場合には、類似の顔を検索することが困難である。そこで、ステップS109では、ステップS101、S103において失敗顔と判定された顔について、顔画像DB4bから類似の顔を検索できる程度に、失敗顔の特徴部を抽出可能か否かについて判定する。   If correction is not possible as a result of the determination in step S105, it is next determined whether or not a face can be specified (S109). When the face portion cannot recognize shadows such as eyes and nose due to blackout or overexposure, it is difficult to search for a similar face. Therefore, in step S109, it is determined whether or not the feature part of the failed face can be extracted to the extent that a similar face can be searched from the face image DB 4b for the face determined as the failed face in steps S101 and S103.

ステップS109における判定の結果、顔特定が可能であれば、次に、顔画像DB4bに類似画像があるか否かを判定する(S111)。ここでは、失敗顔と一致または類似している顔の画像を、顔画像DB4bの中から検索する。   If the result of determination in step S109 is that face identification is possible, it is next determined whether or not there is a similar image in the face image DB 4b (S111). Here, a face image that matches or is similar to the failed face is searched from the face image DB 4b.

ステップS109における判定の結果、顔特定が可能でなかった場合、またはステップS111における判定の結果、類似顔画像がなかった場合には、次に、補正不能表示を行う(S113)。ここでは、顔の画像の置き換えによる画像合成によって適正画像に復元することが不能であることから、その旨を表示部8等に表示する。   If the face is not specified as a result of the determination in step S109, or if there is no similar face image as a result of the determination in step S111, then an uncorrectable display is performed (S113). Here, since it is impossible to restore an appropriate image by image synthesis by replacement of a face image, the fact is displayed on the display unit 8 or the like.

ステップS111における判定の結果、類似顔画像が有った場合には、次に、失敗度合判定を行う(S115)。顔の部分が失敗写真となる理由としては、顔の部分が暗くて失敗した場合もあれば、顔の部分の陰影がなくて失敗した場合もある。失敗の理由により、適正画像への復元方法が異なることから、このステップでは、失敗の度合について判定する。なお、顔の部分が暗い場合であっても、陰影の情報が十分にあれば、ステップS107における補正処理によって復元することが可能である。ステップS115においては、陰影の情報が十分取れない程、顔の部分が暗すぎて失敗したか否かを判定する。この失敗度合判定の詳しい動作については、図14を用いて後述する。   If the result of determination in step S111 is that there is a similar face image, then a failure degree determination is performed (S115). The reason why the face part becomes a failure photo is that the face part is dark and fails, or there is a case where the face part is not shaded and fails. Since the restoration method to an appropriate image differs depending on the reason for failure, the degree of failure is determined in this step. Note that even if the face portion is dark, if there is sufficient shadow information, it can be restored by the correction processing in step S107. In step S115, it is determined whether or not the face portion is too dark to obtain sufficient shading information. Detailed operation of the failure degree determination will be described later with reference to FIG.

失敗度合判定を行うと、次に、失敗度に合わせ顔画像DB4bの顔画像を補正する(S117)。ここでは、顔画像DB4bに記録されていた補完用参照データに基づいて顔の部分を切出し、失敗度合いに応じて、明るさ等を調整した上で、顔の部分を置き換える画像合成を行う。この失敗度に合わせてDB顔画像を補正するための詳しい動作については、図15を用いて後述する。   If the failure degree determination is performed, the face image in the face image DB 4b is then corrected according to the failure degree (S117). Here, the face portion is cut out based on the complementary reference data recorded in the face image DB 4b, the brightness is adjusted according to the degree of failure, and the image composition for replacing the face portion is performed. Detailed operation for correcting the DB face image in accordance with the degree of failure will be described later with reference to FIG.

ステップS117において、顔画像DBの顔画像を補正すると、次に、被写体顔画像と補正した顔画像DBの顔画像の大きさと目鼻位置を合わせて画像合成を行う(S119)。ステップS117において、背景の明るさや顔画像の輝度差に応じて顔画像を補正するので、このステップでは、補正された顔画像を、元の撮影画像中の顔画像と置き換えのための画像合成を行う。画像合成にあたっては、顔の大きさと、顔の目鼻の位置が一致するように行う。   After correcting the face image in the face image DB in step S117, next, image synthesis is performed by combining the size of the subject face image with the face image in the corrected face image DB and the position of the eyes and nose (S119). In step S117, the face image is corrected in accordance with the brightness of the background and the brightness difference of the face image. In this step, image synthesis for replacing the corrected face image with the face image in the original photographed image is performed. Do. In the image composition, the size of the face is matched with the position of the eyes and nose of the face.

ステップS103における判定の結果、失敗顔部がなかった場合、またはステップS107における補正処理を行うと、またはステップS113における補正不能表示を行うと、または、ステップS119における画像合成を行うと、顔補正合成のフローを終了する。   If there is no failed face as a result of the determination in step S103, or if correction processing in step S107 is performed, if uncorrectable display is performed in step S113, or if image synthesis is performed in step S119, face correction synthesis is performed. End the flow.

次に、ステップS101における失敗顔部判定の詳しい動作について、図13に示すフローチャートを用いて説明する。このフローにおいては、図8、図9における被写体A21の顔を第1の顔と称し、被写体B22の顔を第2の顔と称して説明する。   Next, detailed operation of the failed face determination in step S101 will be described using the flowchart shown in FIG. In this flow, the face of the subject A21 in FIGS. 8 and 9 is referred to as a first face, and the face of the subject B22 is referred to as a second face.

失敗顔部判定のフローに入ると、ステップS131〜S149において、背景と顔の部分の輝度差が大きく黒つぶれになっているか否かを判定する。まず、第1の顔の平均露出EF1を算出する(S131)。ここでは、撮像部2から出力される画像データに基づいて、被写体A21の顔の部分の画像の平均露出EF1を求める。平均露出EF1を求めると、次に、第2の顔の平均露出EF2を算出する(S133)。ここでは、撮像部2から出力される画像データに基づいて、被写体B22の顔の部分の画像の平均露出EF2を求める。   When the flow for determining the failed face portion is entered, in steps S131 to S149, it is determined whether or not the luminance difference between the background and the face portion is largely blackened. First, the average exposure EF1 of the first face is calculated (S131). Here, based on the image data output from the imaging unit 2, the average exposure EF1 of the image of the face portion of the subject A21 is obtained. Once the average exposure EF1 is obtained, next, the average exposure EF2 of the second face is calculated (S133). Here, based on the image data output from the imaging unit 2, the average exposure EF2 of the image of the face portion of the subject B22 is obtained.

第2の顔の平均露出EF2を求めると、次に、背景の平均露出EAを求める(S135)。ここでは、撮像部2から出力される画像データのうち、被写体A21および被写体B22の顔の部分以外の領域の画像データに基づいて、背景の平均露出EAを算出する。   Once the average exposure EF2 of the second face is obtained, the average exposure EA of the background is then obtained (S135). Here, the average exposure EA of the background is calculated based on the image data of the area other than the face portions of the subject A21 and the subject B22 among the image data output from the imaging unit 2.

続いて、背景の平均露出EAから第1の顔の平均露出EF1を減算した値が、所定の輝度差ΔE1より大きいか否かの判定、すなわち、EA−EF1>ΔE1であるか否かの判定を行う(S137)。ここでは、第1の顔が背景の明るさから見て暗いか否かを判定する。ここで輝度差ΔE1は、背景と顔の部分の輝度差が大きく黒つぶれによる失敗写真か否かを判定するための値である。   Subsequently, it is determined whether or not a value obtained by subtracting the average exposure EF1 of the first face from the average exposure EA of the background is larger than a predetermined luminance difference ΔE1, that is, whether EA−EF1> ΔE1. (S137). Here, it is determined whether or not the first face is dark when viewed from the brightness of the background. Here, the luminance difference ΔE1 is a value for determining whether or not the photo is a failure due to blackout due to a large luminance difference between the background and the face portion.

ステップS137における判定の結果、EA−EF1>ΔE1であった場合には、第1の顔は暗いと判定される。この場合には、次に、背景の平均露出EAから第2の顔の平均露出EF2を減算した値が、所定の輝度差ΔE1より大きいか否かの判定、すなわち、EA−EF2>ΔE1であるか否かの判定を行う(S139)。   If the result of determination in step S137 is EA−EF1> ΔE1, the first face is determined to be dark. In this case, it is next determined whether or not the value obtained by subtracting the average exposure EF2 of the second face from the average exposure EA of the background is greater than a predetermined luminance difference ΔE1, that is, EA−EF2> ΔE1. It is determined whether or not (S139).

ステップS139における判定の結果、EA−EF2>ΔE1でなかった場合には、第2の顔は暗くなく、第1の顔が暗いことから、第1の顔が失敗と判定する(S143)。一方、ステップS139における判定の結果、EA−EF2>ΔE1であった場合には、第1の顔および第2の顔の両方とも暗いことから、第1および第2の顔が共に失敗と判定する(S141)。   As a result of the determination in step S139, if EA−EF2> ΔE1 is not satisfied, the first face is determined to be unsuccessful because the second face is not dark and the first face is dark (S143). On the other hand, if EA−EF2> ΔE1 as a result of the determination in step S139, both the first face and the second face are determined to have failed because both the first face and the second face are dark. (S141).

ステップS137における判定の結果、EA−EF1>ΔE1でなかった場合には、第1の顔は暗くないと判定される。この場合には、次に、ステップS139と同様に、EA−EF2>ΔE1であるか否かの判定を行う(S145)。この判定の結果、EA−EF2>ΔE1であった場合には、第1の顔は暗くないが、第2の顔が暗いことから、第2の顔が失敗と判定する(S147)。一方、ステップS145における判定の結果、EA−EF2>ΔE1でなかった場合には、第1の顔と第2の顔の両方共暗くないことから、失敗顔なしと判定する(S149)。   As a result of the determination in step S137, if EA−EF1> ΔE1 is not satisfied, it is determined that the first face is not dark. In this case, next, as in step S139, it is determined whether or not EA−EF2> ΔE1 is satisfied (S145). As a result of this determination, if EA−EF2> ΔE1, the first face is not dark, but the second face is dark, so the second face is determined to be unsuccessful (S147). On the other hand, if EA−EF2> ΔE1 is not satisfied as a result of the determination in step S145, it is determined that there is no unsuccessful face because both the first face and the second face are not dark (S149).

ステップS141、S143、S147、S149において、失敗顔の判定結果を記憶すると、次に、失敗でない顔部の明暗判定を行う(S151)。ステップS137〜S149における判定は、ステップS131〜S135において取得した平均露出に基づいて、判定していた。しかし、顔部の中に明暗の輝度差が大きいと、平均露出から判定した場合には失敗顔とはならない場合であっても、図10を用いて説明したように失敗顔となる場合がある。すなわち、明部が白とびとなり、また逆に暗部が黒つぶれとなっている場合がある。そこで、ステップS151においては、顔部の中における輝度差を判定する。   If the determination result of the failed face is stored in steps S141, S143, S147, and S149, next, the brightness determination of the face that is not failed is performed (S151). The determinations in steps S137 to S149 have been made based on the average exposure acquired in steps S131 to S135. However, if the brightness difference between light and dark in the face is large, even if the face is not a failure face when judged from the average exposure, the face may fail as described with reference to FIG. . That is, the bright part may be overexposed, and conversely the dark part may be underexposed. Therefore, in step S151, the brightness difference in the face is determined.

ステップS151において輝度差を検出すると、次に、その輝度差がΔE2以上の場合に、失敗顔と判定する(S153)。輝度差ΔE2としては、設計値として適宜選択すればよいが、例えば、2段〜3段程度とすればよい。この程度の輝度差があると、明るすぎる部分や暗すぎる部分の陰影を識別することが困難となる。また、明部が白とび、または暗部が黒つぶれとなっている可能性がある。このステップにおいては、詳しく示してないが、第1および第2の顔毎に輝度差がΔE2以上あるか否かを判定し、その結果を一時記憶する。ステップS153において、失敗顔の判定を行うと、元のフローに戻る。   If a luminance difference is detected in step S151, it is determined that the face is a failed face if the luminance difference is equal to or greater than ΔE2 (S153). The luminance difference ΔE2 may be appropriately selected as a design value, but may be, for example, about two to three stages. If there is such a luminance difference, it becomes difficult to identify shadows of areas that are too bright or too dark. Further, there is a possibility that the bright part is overexposure or the dark part is underexposure. In this step, although not shown in detail, it is determined whether or not the luminance difference is greater than or equal to ΔE2 for each of the first and second faces, and the result is temporarily stored. If the failure face is determined in step S153, the process returns to the original flow.

このように失敗顔部判定のフローにおいては、第1および第2の顔について、それぞれ平均露出の差が大きく失敗顔であるか判定し、また第1および第2の顔について、それぞれの顔の中で輝度差が大きく失敗顔であるかを判定する。なお、本フローにおいては、第1および第2の顔のみについて判定する場合を示したが、3以上の顔が存在する場合には、同様に判定すればよい。また、ステップS131〜S149においては黒つぶれになり、顔部の陰影情報が失われている場合について判定していたが、白とびになって顔部の陰影情報が失われている場合についても判定するようにしてもよい。   As described above, in the failure face determination flow, it is determined whether the first and second faces have a large difference in average exposure, and the failure faces are determined to be failure faces. It is determined whether or not the face is a failure due to a large brightness difference. In this flow, the case of determining only the first and second faces has been shown, but if there are three or more faces, the same determination may be made. Further, in steps S131 to S149, it is determined that the shadow is blacked out and the shadow information of the face is lost. However, it is also determined that the shadow information of the face is lost due to overexposure. You may make it do.

次に、ステップS115における失敗度合判定の詳しい動作について、図14に示すフローチャートを用いて説明する。失敗度合判定のフローに入ると、まず、第1の顔が暗くて失敗したか否かの判定を行う(S161)。ステップS143、S141において、陰影の情報が十分取れない程、第1の顔が暗い場合には、失敗顔である旨が一時記憶されることから、この記憶結果に基づいて判定する。   Next, detailed operation of the failure degree determination in step S115 will be described using the flowchart shown in FIG. When the failure degree determination flow is entered, it is first determined whether or not the first face is dark and failed (S161). In Steps S143 and S141, when the first face is dark enough that the shadow information is not sufficiently obtained, the fact that the face is a failed face is temporarily stored, and therefore determination is made based on the storage result.

ステップS161における判定の結果、第1の顔が暗くて失敗した場合には、次に、第1の顔と背景との差ΔEF1を求める(S165)。ここでは、ステップS135において求めた背景の平均露出EAと、ステップS131において求めた第1の顔の平均露出EF1との差分、すなわち、EA−EF1=ΔEF1を演算する。   If the result of determination in step S161 is that the first face is dark and fails, then the difference ΔEF1 between the first face and the background is obtained (S165). Here, a difference between the average exposure EA of the background obtained in step S135 and the average exposure EF1 of the first face obtained in step S131, that is, EA−EF1 = ΔEF1 is calculated.

ステップS161における判定の結果、第1の顔が暗くて失敗でなかった場合には、次に、第1の顔が陰影で失敗したか否かの判定を行う(S163)。ステップS151、S153において、第1の顔に陰影があり、明暗がΔE2以上であり、黒つぶれ又は白とびの可能性があれば失敗顔と判定し、その旨を一時記憶することから、このステップでは、一時記憶の結果に基づいて判定する。   If the result of determination in step S161 is that the first face is dark and has not failed, it is next determined whether or not the first face has failed due to shading (S163). In steps S151 and S153, if there is a shadow on the first face, the brightness is ΔE2 or more, and if there is a possibility of blackout or overexposure, it is determined as a failed face, and this is temporarily stored. Then, it determines based on the result of temporary storage.

ステップS163における判定の結果、第1の顔が陰影で失敗であった場合には、第1の顔の顔内陰影の分布を判定する(S167)。このステップでは、図11(a)を用いて説明したように、顔の中で最高輝度と最低輝度の差ΔEFを、撮像部2から出力される画像データに基づいて演算する。   If the result of determination in step S163 is that the first face has failed due to a shadow, the distribution of the shadow within the face of the first face is determined (S167). In this step, as described with reference to FIG. 11A, the difference ΔEF between the highest luminance and the lowest luminance in the face is calculated based on the image data output from the imaging unit 2.

ステップS163における判定の結果、第1の顔の陰影で失敗でなかった場合、またはステップS165またはS167における判定を行うと、次に、第2の顔が暗くて失敗か否かの判定を行う(S171)。ステップS147、S141において、陰影の情報が十分取れない程、第2の顔が暗い場合には、失敗顔である旨が一時記憶されることから、この記憶結果に基づいて判定する。   If the result of determination in step S163 is that there was no failure due to the shadow of the first face, or if the determination in step S165 or S167 was made, it is next determined whether or not the second face was dark and failed ( S171). In Steps S147 and S141, if the second face is dark enough that the shadow information is not sufficiently obtained, the fact that the face is a failed face is temporarily stored. Therefore, the determination is based on the storage result.

ステップS171における判定の結果、第2の顔が暗くて失敗した場合には、次に、第2の顔と背景との差ΔEF2を求める(S175)。ここでは、ステップS135において求めた背景の平均露出EAと、ステップS133において求めた第2の顔の平均露出EF2との差分、すなわち、EA−EF2=ΔEF2を演算する。   If the result of determination in step S171 is that the second face is dark and fails, then the difference ΔEF2 between the second face and the background is obtained (S175). Here, the difference between the average exposure EA of the background obtained in step S135 and the average exposure EF2 of the second face obtained in step S133, that is, EA−EF2 = ΔEF2 is calculated.

ステップS171における判定の結果、第2の顔が暗くて失敗でなかった場合には、次に、第2の顔が陰影で失敗したか否かの判定を行う(S173)。ステップS151、S153において、第2の顔に陰影があり、明暗がΔE2以上であり、黒つぶれ又は白とびの可能性があれば失敗顔と判定し、その旨を一時記憶することから、このステップでは、一時記憶の結果に基づいて判定する。   If the result of determination in step S171 is that the second face is dark and has not failed, it is next determined whether or not the second face has failed due to shading (S173). In steps S151 and S153, if there is a shadow on the second face, the brightness is equal to or greater than ΔE2, and there is a possibility of blackout or overexposure, it is determined as a failed face, and this is temporarily stored. Then, it determines based on the result of temporary storage.

ステップS173における判定の結果、第2の顔が陰影で失敗であった場合には、第2の顔の顔内陰影の分布を判定する(S177)。このステップでは、図11(a)を用いて説明したように、顔の中で最高輝度と最低輝度の差ΔEFを、撮像部2から出力される画像データに基づいて演算する。   If the result of determination in step S173 is that the second face has failed due to a shadow, the distribution of the shadow within the face of the second face is determined (S177). In this step, as described with reference to FIG. 11A, the difference ΔEF between the highest luminance and the lowest luminance in the face is calculated based on the image data output from the imaging unit 2.

ステップS173における判定の結果、第2の顔の陰影で失敗でなかった場合、またはステップS175またはS177における判定を行うと、元のフローに戻る。   As a result of the determination in step S173, if the failure is not due to the shadow of the second face, or if the determination in step S175 or S177 is performed, the process returns to the original flow.

このように失敗度合判定のフローにおいては、第1および第2の顔毎に背景との輝度差ΔEF1、ΔEF2を判定し、または第1および第2の顔毎に顔の中における輝度差ΔEFを判定し、失敗の度合いを求めている。なお、本フローにおいては、第1および第2の顔のみについて判定する場合を示したが、3以上の顔が存在する場合には、同様に判定すればよい。また、ステップS161、S171においては顔が暗く黒つぶれになり失敗したかを判定していたが、顔が明るく白とびになって顔部の陰影情報が失われている場合に、背景との輝度差を判定するようにしてもよい。   As described above, in the failure degree determination flow, the luminance differences ΔEF1 and ΔEF2 from the background are determined for each of the first and second faces, or the luminance difference ΔEF in the face is determined for each of the first and second faces. Judgment and seeking the degree of failure. In this flow, the case of determining only the first and second faces has been shown, but if there are three or more faces, the same determination may be made. In steps S161 and S171, it was determined whether the face was dark and blacked out and failed. However, when the face is bright and overexposed and the shadow information of the face is lost, the brightness of the background The difference may be determined.

次に、ステップS117における失敗度に合わせDB顔画像を補正の詳しい動作について、図15に示すフローチャートを用いて説明する。失敗度に合わせDB顔画像を補正のフローに入ると、まず、ステップS161と同様に、第1の顔が暗くて失敗か否かの判定を行う(S181)。   Next, detailed operation for correcting the DB face image in accordance with the degree of failure in step S117 will be described using the flowchart shown in FIG. When the DB face image correction flow is entered in accordance with the degree of failure, first, as in step S161, it is determined whether or not the first face is dark and failed (S181).

ステップS181における判定の結果、第1の顔が暗くて失敗した場合には、次に、第1の顔のDB画像の露出量を背景マイナスΔEF1/2として合成用画像を作成する(S185)。ここでは、ステップS111において、顔画像DB4bから検索された失敗顔と類似している顔の画像に対して、ステップS165において算出された第1の顔の背景との差ΔEF1の半分(すなわち、1/2)だけ、輝度を暗くした顔の画像を、合成用画像として生成する(図9(b)参照)。   If the result of determination in step S181 is that the first face is dark and fails, then a composition image is created with the exposure amount of the DB image of the first face as background minus ΔEF1 / 2 (S185). Here, for the face image similar to the failed face retrieved from the face image DB 4b in step S111, half the difference ΔEF1 from the first face background calculated in step S165 (ie, 1 / 2), a face image with reduced brightness is generated as a composition image (see FIG. 9B).

ステップS181における判定の結果、第1の顔が暗くて失敗でなかった場合には、次に、ステップS163と同様に、第1の顔が陰影で失敗したか否かの判定を行う(S183)。   If the result of determination in step S181 is that the first face is dark and has not failed, it is next determined whether or not the first face has failed due to shading as in step S163 (S183). .

ステップS183における判定の結果、第1の顔が陰影で失敗であった場合には、次に、第1の顔のDB画像の露出量を画面内の第1の顔に合わせ、その顔内陰影分布を1/2として合成用画像を作成する(S187)。ここでは、ステップS111において、顔画像DB4bから検索された失敗顔と類似している顔の画像の顔内陰影分を、ステップS167において算出された第1の顔内の輝度差ΔEFの1/2とした合成用画像を生成する(図11(b)参照)。   If the result of determination in step S183 is that the first face has failed due to a shadow, then the exposure amount of the first face DB image is matched with the first face in the screen, and the in-face shadow is determined. An image for synthesis is created with a distribution of 1/2 (S187). Here, in step S111, the in-face shadow of the face image similar to the failed face retrieved from the face image DB 4b is ½ of the luminance difference ΔEF in the first face calculated in step S167. Is generated (see FIG. 11B).

ステップS183における判定の結果、第1の顔の陰影で失敗でなかった場合、またはステップS185またはS187において合成用画像を作成すると、次に、ステップS171と同様に、第2の顔が暗くて失敗か否かの判定を行う(S191)。   If the result of determination in step S183 is that there was no failure due to the shadow of the first face, or if an image for synthesis was created in step S185 or S187, then the second face was dark and failed as in step S171. It is determined whether or not (S191).

ステップS191における判定の結果、第2の顔が暗くて失敗した場合には、次に、第2の顔のDB画像の露出量を背景マイナスΔEF2/2として合成用画像を作成する(S195)。ここでは、ステップS111において、顔画像DB4bから検索された失敗顔と類似している顔の画像に対して、ステップS165において算出された第1の顔の背景との差ΔEF2の半分(すなわち、1/2)だけ、輝度を暗くした顔の画像を、合成用画像として生成する(図9(b)参照)。   If the result of determination in step S191 is that the second face is dark and fails, then a composition image is created with the exposure amount of the DB image of the second face set to the background minus ΔEF2 / 2 (S195). Here, for the face image similar to the failed face retrieved from the face image DB 4b in step S111, half the difference ΔEF2 from the first face background calculated in step S165 (ie, 1 / 2), a face image with reduced brightness is generated as a composition image (see FIG. 9B).

ステップS191における判定の結果、第2の顔が暗くて失敗でなかった場合には、次に、ステップS173と同様に、第2の顔が陰影で失敗したか否かの判定を行う(S193)。   If the result of determination in step S191 is that the second face is dark and has not failed, it is next determined whether or not the second face has failed due to shading as in step S173 (S193). .

ステップS193における判定の結果、第2の顔が陰影で失敗であった場合には、次に、第2の顔のDB画像の露出量を画面内の第2の顔に合わせ、その顔内陰影分布を1/2として合成用画像を作成する(S197)。ここでは、ステップS111において、顔画像DB4bから検索された失敗顔と類似している顔の画像の顔内陰影分を、ステップS177において算出された第2の顔内の輝度差ΔEFの1/2とした合成用画像を生成する(図11(b)参照)。   If the result of determination in step S193 is that the second face has failed due to a shadow, then the exposure amount of the DB image of the second face is matched with the second face in the screen, and the shadow within the face is matched. An image for synthesis is created with a distribution of 1/2 (S197). Here, in step S111, the in-face shadow of the face image similar to the failed face retrieved from the face image DB 4b is set to 1/2 of the brightness difference ΔEF in the second face calculated in step S177. Is generated (see FIG. 11B).

ステップS193における判定の結果、第2の顔の陰影で失敗でなかった場合、またはステップS195またはS197において合成用画像を作成すると、元のフローに戻る。元のフローに戻ると前述したように、本フローにおいて合成した顔画像と、元の被写体画像を、目鼻位置が一致するようにして画像合成を行う(S119参照)。   If the result of determination in step S193 is that the shadow of the second face was not a failure, or if an image for synthesis has been created in step S195 or S197, the original flow is returned to. When returning to the original flow, as described above, the face image combined in this flow and the original subject image are combined so that the eye-nose positions coincide (see S119).

このように失敗度に合わせDB顔画像を補正のフローにおいては、顔の部分が背景より暗くて陰影の情報が十分取れないために失敗写真となった場合には、顔画像DB4bに記録されている同一人物の顔の部分に置き換える画像合成用の画像を生成するようにしている。この場合、顔画像DB4bに記録されている顔画像をそのまま使用すると背景との明るさの差が大きい場合には、違和感のある画像となることから、本実施形態においては、背景と顔の明るさの差が、実際の撮影より半分となるように補正している(S185、S195参照)。なお、この補正量は、本実施形態では輝度差ΔEF1、ΔEF2の1/2としているが、この値は設計事項として適宜変更してもよい。また、輝度差の定数倍以外にも、一定の輝度差となるようにしても勿論かまわない。   Thus, in the flow of correcting the DB face image in accordance with the failure degree, if the face portion is darker than the background and the shadow information is not sufficiently obtained, the failure image is recorded and recorded in the face image DB 4b. An image for image composition to be replaced with the face portion of the same person is generated. In this case, if the face image recorded in the face image DB 4b is used as it is, if the brightness difference from the background is large, the image becomes uncomfortable, and in this embodiment, the brightness of the background and the face. The difference is corrected to be half that of actual photographing (see S185 and S195). In this embodiment, the correction amount is ½ of the luminance differences ΔEF1 and ΔEF2, but this value may be appropriately changed as a design matter. In addition to the constant multiple of the luminance difference, it is of course possible to have a constant luminance difference.

また、本実施形態においては、顔の中で陰影が大きく失敗した場合には、顔の中の陰影を1/2に圧縮した画像を合成用画像として生成している(S187、S197参照)。これにより自然な感じの陰影のある顔画像に補正することができる。なお、この補正量は、本実施形態では、輝度差ΔEVの1/2としたが、これに限らず、設計事項として適宜変更してもよい。   In the present embodiment, when the shadow in the face largely fails, an image in which the shadow in the face is compressed by half is generated as a synthesis image (see S187 and S197). This makes it possible to correct the face image with a natural-looking shadow. In this embodiment, the correction amount is ½ of the luminance difference ΔEV. However, the correction amount is not limited to this, and may be appropriately changed as a design matter.

なお、図15に示したフローにおいては、第1および第2の顔のみについて判定する場合を示したが、3以上の顔が存在する場合には、同様に判定すればよい。また、顔が明るすぎて白とびとなったことにより失敗顔となった場合には、顔画像DB4bから検索された顔画像を、顔部分と背景との輝度差の半分だけ、明るくし補正し、この補正した顔画像を合成用画像とすればよい。   In the flow shown in FIG. 15, the case where only the first and second faces are determined is shown, but if there are three or more faces, the determination may be made in the same manner. If the face is too bright and overlooked, and the face has failed, the face image retrieved from the face image DB 4b is brightened and corrected by half the brightness difference between the face portion and the background. The corrected face image may be used as a composition image.

次に、ステップS119において行う画像合成の変形例について、図16および図17を用いて説明する。本発明の第1および第2実施形態においては、顔画像DB4bに記録されている顔に置き換える画像合成は、単に、合成時に静止画的に表示するだけであった。第2実施形態の変形例においては、画像合成を行うと、顔画像を置き換える際に動画的表現を行うようにしている。   Next, a modified example of the image composition performed in step S119 will be described with reference to FIGS. In the first and second embodiments of the present invention, the image composition replaced with the face recorded in the face image DB 4b is simply displayed as a still image at the time of composition. In the modification of the second embodiment, when image synthesis is performed, moving image expression is performed when a face image is replaced.

今、図10(a)に示す被写体B22の顔の部分を顔画像DB4bに記録されている顔画像22aに置き換える画像合成を行うとする。この画像合成を行うにあたっては、まず、置き換える被写体B22の顔画像を、図10(a)に示す大きさから、図10(b)に示す大きさにズームアップするように拡大表示する。この拡大表示にあたっては、アニメーション効果で小画像から大画像に変化させながら行う。   Now, assume that image composition is performed in which the face portion of the subject B22 shown in FIG. 10A is replaced with the face image 22a recorded in the face image DB 4b. In performing this image synthesis, first, the face image of the subject B22 to be replaced is enlarged and displayed so as to zoom in from the size shown in FIG. 10A to the size shown in FIG. This enlarged display is performed while changing from a small image to a large image by an animation effect.

そして、図10(b)に示すように拡大表示されると、そこで、顔画像DB4bに記録されている補完用参照データの中から同一人物の顔画像22aと置換する画像合成を行う。この場合も、図10および図11を用いて説明したように、周囲の明るさを考慮すると共に顔の明暗の変化を小さくなるように顔画像22bの明暗を補正してから画像合成するとよい。   Then, when the enlarged display is performed as shown in FIG. 10B, image composition is performed in which the face image 22a of the same person is replaced from the supplementary reference data recorded in the face image DB 4b. Also in this case, as described with reference to FIGS. 10 and 11, it is preferable to combine the images after correcting the brightness of the face image 22 b so that the brightness of the face is considered and the change in brightness of the face is reduced.

次に、図16を用いて説明した動画的表現を行うためのフローについて、図17に示すフローチャートを用いて説明する。被写体顔画像と補正DB顔画像の合成のフローに入ると、まず、動画表現を行うか否かの判定を行う(S201)。動画的表現を行う場合には、本変形例においては、事前にメニュー画面等において、設定するので、このステップでは、メニュー画面等において、動画表現が設定されているか否かを判定する。   Next, the flow for performing the moving image expression described with reference to FIG. 16 will be described with reference to the flowchart shown in FIG. When the flow of synthesis of the subject face image and the corrected DB face image is entered, it is first determined whether or not to perform moving image expression (S201). In the case of performing moving image expression, in this modification, since the setting is made in advance on the menu screen or the like, it is determined in this step whether or not the moving image expression is set on the menu screen or the like.

ステップS201における判定の結果、動画表現を行う場合には、次に、画面の大きさと被写体の顔の大きさの比R1、すなわち、R1=(画面の大きさ)/(被写体の顔の大きさ)を求める(S203)。ここでは、例えば、図16(a)に示す例では、画面の大きさを、被写体B22の顔の大きさで除算を行い、この演算結果をR1とする。   If the result of determination in step S201 is to express moving images, then the ratio R1 between the screen size and the subject face size, ie, R1 = (screen size) / (subject face size). ) Is obtained (S203). Here, for example, in the example shown in FIG. 16A, the size of the screen is divided by the size of the face of the subject B22, and this calculation result is R1.

ステップS203において、画面と顔の大きさの比R1を求めると、次に、被写体の顔の大きさを次第にR1倍する(S205)。ここでは、図16を用いて説明したように、被写体B22の顔の大きさをアニメーション効果で徐々に大きくする。顔部を徐々に拡大表示しながら、R1倍に達したか否かの判定を行う(S207)。この判定の結果、R1倍に達していなければ、ステップS205に戻り、拡大表示を続行する。なお、R1倍に達すると、被写体B22の顔の大きさが、ほぼ画面の大きさとなる。   If the screen-to-face size ratio R1 is obtained in step S203, then the face size of the subject is gradually multiplied by R1 (S205). Here, as described with reference to FIG. 16, the size of the face of the subject B22 is gradually increased by the animation effect. While gradually expanding and displaying the face, it is determined whether or not the face has reached R1 (S207). If the result of this determination is that R1 has not been reached, processing returns to step S205 and enlargement display continues. When R1 is reached, the size of the face of the subject B22 becomes approximately the size of the screen.

ステップS207における判定の結果、R1倍に達すると、DB顔画像を同じ大きさにし、目鼻位置を合わせて、画像に嵌め込む(S209)。顔画像の大きさがR1倍に達しているので、顔画像が略画面の大きさとなっている。そこで、略画面の大きさとなった顔画像を、ステップS117において生成された合成用の顔画像と置き換える画像合成を行う。このとき、もとの顔画像の目鼻位置と、合成用の顔画像の目鼻位置が略一致するように位置合わせを行ったのち、画像の置き換えを行う。画像の置き換えが終わると、DB顔画像は元のサイズに戻す。   As a result of the determination in step S207, when the R1 times is reached, the DB face image is made the same size, and the eyes and nose positions are aligned and fitted into the image (S209). Since the size of the face image has reached R1 times, the face image is approximately the size of the screen. Therefore, image synthesis is performed in which the face image having a substantially screen size is replaced with the face image for synthesis generated in step S117. At this time, alignment is performed so that the eye-nose position of the original face image and the eye-nose position of the face image for synthesis are substantially matched, and then the image is replaced. When the image replacement is completed, the DB face image is restored to the original size.

ステップS201における判定の結果、動画表現でなかった場合には、本発明の第2実施形態と同様、動画表現を行うことなく顔画像の置き換えの画像合成を行う。このために、まず、被写体の顔の大きさと顔画像DBの顔画像の大きさの比R2、すなわち、R2=(被写体の顔の大きさ)/(DB顔画像の大きさ)を求める(S211)。ここでは、例えば、図16に示す例では、図16(a)に示す被写体B22の顔の大きさと、図16(c)に示す顔画像22aの大きさで除算を行い、この演算結果をR2とする。   If the result of determination in step S <b> 201 is that it is not a moving image expression, the image composition for facial image replacement is performed without performing the moving image expression, as in the second embodiment of the present invention. For this purpose, first, a ratio R2 between the face size of the subject and the face image size of the face image DB, that is, R2 = (face size of subject) / (size of DB face image) is obtained (S211). ). Here, for example, in the example shown in FIG. 16, division is performed by the size of the face of the subject B22 shown in FIG. 16 (a) and the size of the face image 22a shown in FIG. 16 (c). And

比R2を求めると、次に、DB顔画像をR2倍して画像に嵌め込みを行う(S213)。ここでは、例えば、顔画像DB4bから検索した同一人物の顔の大きさを、撮影画像の被写体の顔画像と同じ大きさになるように補正した上で、顔画像を置き換える画像合成を行う。ステップS209またはS213における画像の置き換えを行うと、元のフローに戻る。   Once the ratio R2 is obtained, the DB face image is then multiplied by R2 and fitted into the image (S213). Here, for example, the face size of the same person retrieved from the face image DB 4b is corrected so as to be the same size as the face image of the subject of the photographed image, and then image composition for replacing the face image is performed. When the image replacement in step S209 or S213 is performed, the process returns to the original flow.

このように、本発明の第2実施形態の変形例においては、顔画像DB4bから検索された同一人物の顔画像に置き換える画像合成を行う際に、一旦、置き換えの対象となる顔画像を拡大表示し、拡大表示した時点で画像の置き換えを行うようにしている。単に顔部のみ顔画像DB4bから検索された顔画像に置き換えると、服装は暗いのに、顔だけ明るい場合には不自然な写真となる可能性がある。本変形例のように、顔部を拡大し、画面一杯になったところで、顔画像DB4bから検索した画像を置き換えるようにすれば(S205→S209)、より自然な表示が可能となる。   As described above, in the modification of the second embodiment of the present invention, when the image composition for replacing the face image of the same person retrieved from the face image DB 4b is performed, the face image to be replaced is temporarily displayed in an enlarged manner. However, the image is replaced when the image is enlarged. If only the face part is replaced with the face image retrieved from the face image DB 4b, there is a possibility that an unnatural photograph will be obtained if the clothes are dark but only the face is bright. As in this modification, when the face is enlarged and the screen is full, replacing the image retrieved from the face image DB 4b (S205 → S209) enables more natural display.

次に、本発明の第2実施形態における顔画像DB4bにおける顔画像データベースの作成について、図18ないし図21を用いて説明する。まず、顔画像データベースに記録する顔画像の生成について説明する。図18に示す顔画像23は、カメラ10で撮影した撮影画像の内の顔の部分を示す。顔画像データベースに記録するにあたって、まず、顔画像23の顔の大きさを正規化する。すなわち、一定の大きさの正規化顔画像23aに、大きさを変更する。また、顔画像データベースに記録するにあたって、鼻筋線27が鉛直方向となるように、顔画像を回転させる。   Next, creation of a face image database in the face image DB 4b according to the second embodiment of the present invention will be described with reference to FIGS. First, generation of a face image to be recorded in the face image database will be described. A face image 23 shown in FIG. 18 shows a face portion in a photographed image photographed by the camera 10. In recording in the face image database, first, the face size of the face image 23 is normalized. That is, the size is changed to a normalized face image 23a having a certain size. Further, when recording in the face image database, the face image is rotated so that the nose muscle line 27 is in the vertical direction.

鼻筋線27を鉛直方向にすると、図19(a)に示すような画像となる。また、同一人物について、図19(c)に示すように、鼻筋線27を鉛直した別の顔画像25が有る場合には、顔画像23および顔画像25から、図19(b)に示すように、モーフィングにより図19(b)に示すような顔画像24を生成する。これによって、顔画像23〜25の3種類の顔画像を顔画像DB4bに記録することが可能となる。   When the nose line 27 is set in the vertical direction, an image as shown in FIG. Further, as shown in FIG. 19 (c), when there is another face image 25 with the nose line 27 vertical as shown in FIG. 19 (c), from the face image 23 and the face image 25, as shown in FIG. 19 (b). In addition, a face image 24 as shown in FIG. 19B is generated by morphing. As a result, three types of face images 23 to 25 can be recorded in the face image DB 4b.

図18および図19を用いて説明した顔画像の生成を利用して作成した顔画像DB4bに記録される顔画像データベースの一例を図20に示す。この顔画像データベースは、個人A、B・・・について、異なる表情ごとにそれぞれ鼻筋線27が顔の中心から、0度、左に10度、左に20度・・・と異なる向きの顔がマトリックス状に記録している。なお、表情1は笑顔の場合であり、表情2は普通の顔の場合であり、表情3は怒っている場合の顔を示している。この例では、顔の向きは10度おきであり、また、顔の表情は3種類であるが、これに限らず、これよりも少なくまたは多く分類分けを行って、顔画像を記録するようにしても勿論かまわない。また、モーフィングによって中間画像を1つ生成していたが、1つに限らず複数、生成するようにしてもよい。   FIG. 20 shows an example of a face image database recorded in the face image DB 4b created by using the face image generation described with reference to FIGS. In this face image database, for each of the individual A, B,..., The nasal lines 27 are faced in different directions from the center of the face, 0 degrees, 10 degrees to the left, 20 degrees to the left,. Recorded in a matrix. The expression 1 is a smile, the expression 2 is an ordinary face, and the expression 3 is an angry face. In this example, the orientation of the face is every 10 degrees, and there are three types of facial expressions. However, the present invention is not limited to this, and the face image is recorded by classifying less or more than this. But of course it does n’t matter. Further, although one intermediate image is generated by morphing, the number is not limited to one, and a plurality of intermediate images may be generated.

次に、上述した顔画像データベースを作成するためのフローについて、図21に示すフローチャートを用いて説明する。顔画像データベース作成のフローに入ると、まず、個人認証判定を行う(S301)。ここでは、顔検出部3によって検出された顔の特徴を用いて、個人を特定する。   Next, a flow for creating the above-described face image database will be described using the flowchart shown in FIG. If the flow for creating the face image database is entered, first, personal authentication determination is performed (S301). Here, an individual is specified using the facial features detected by the face detector 3.

個人認証判定を行うと、次に、表情・角度判定を行う(S303)。ここでは、顔検出部3による目や口元の検出結果を用いて、笑顔、普通、怒った顔等、顔の表情を判定する。また、顔検出部3によって検出された鼻筋線27を用いて、顔の向きの角度の判定も行う。   Once personal authentication determination is made, facial expression / angle determination is then performed (S303). Here, facial expressions such as a smile, a normal face, and an angry face are determined using the detection result of the eyes and mouth by the face detection unit 3. Further, the angle of the face orientation is also determined using the nose line 27 detected by the face detection unit 3.

表情・角度判定を行うと、次に、認証不能か否かの判定を行う(S305)。ここでは、ステップS301における個人認証判定の結果、個人を特定できたか否かを判定する。この判定の結果、個人認証できなかった場合には、手動タグ付けを行う(S307)。個人認証ができなかった顔画像であることから、ユーザが適宜、個人名等の手動でタグを付する。   Once facial expression / angle determination is performed, it is next determined whether authentication is impossible (S305). Here, it is determined whether or not an individual has been identified as a result of the personal authentication determination in step S301. If the result of this determination is that personal authentication has failed, manual tagging is performed (S307). Since the face image cannot be personally authenticated, the user manually attaches a tag such as a personal name as appropriate.

手動タグ付けを行うと、次に、手動タグを付した人物と同一人物が他に有るか否かを判定する(S309)。ここでは、手動タグが付された顔画像の中に同一人物が有るか否かを判定する。この判定の結果、同一人物がいなかった場合には、新しい個人として分類する(S311)。   Once manual tagging has been performed, it is next determined whether or not there is another person who is the same as the person to whom the manual tag is attached (S309). Here, it is determined whether or not the same person exists in the face image to which the manual tag is attached. As a result of this determination, if there is no same person, it is classified as a new individual (S311).

ステップS305における判定の結果、個人認証できた場合には、次に、同一表情・同一角度の顔画像が顔画像DB4bに記録されているか否かを判定する(S307)。図20を用いて説明したように、顔画像データベースでは、顔の角度と表情に基づいてデータベースを作成しており、既に、記録されている場合には、更なる記録を行わないことから、このステップでは、記録済みか否かを判定する。   If the result of determination in step S305 is that personal authentication has been made, it is next determined whether or not face images having the same facial expression and angle are recorded in the face image DB 4b (S307). As described with reference to FIG. 20, in the face image database, a database is created based on the angle and expression of the face, and if already recorded, no further recording is performed. In step, it is determined whether or not recording has been completed.

ステップS307における判定の結果、同一表情・角度の顔画像が記録されていなかった場合、または、ステップS309における判定の結果、同一人物が有った場合、またはステップS311において新しい個人として分類した場合には、次に、顔部の画像を切出し、顔画像とする(S313)。ここでは、信号処理及び制御部1によって、顔検出部3によって検出された顔の部分をトリミングする。   As a result of determination in step S307, when face images of the same expression / angle are not recorded, or as a result of determination in step S309, there is the same person, or when classification as a new individual in step S311 Next, a face image is cut out to be a face image (S313). Here, the face portion detected by the face detection unit 3 is trimmed by the signal processing and control unit 1.

顔画像を生成すると、次に、顔の大きさは画面の1/5に正規化し、また鼻筋を鉛直方向になるように顔画像を回転する(S315)。ここでは、図18を用いて説明したように、顔の大きさと鼻筋方向を揃える。なお、顔の大きさは例示であり、画面の1/5よりも大きくても小さくても構わないが、1/5程度が通常の撮影画像における顔の大きさを考慮すると扱いやすいサイズである。   Once the face image is generated, the face size is normalized to 1/5 of the screen, and the face image is rotated so that the nose is in the vertical direction (S315). Here, as described with reference to FIG. 18, the size of the face and the direction of the nose are aligned. The size of the face is an example, and it may be larger or smaller than 1/5 of the screen, but about 1/5 is a size that is easy to handle in consideration of the size of the face in a normal captured image. .

続いて、ステップ315で修正された顔画像を、個人対顔画像として登録する(S317)。ここでは、顔画像DB4bに、個人名に対応して顔画像を、図20に示すように記録する。   Subsequently, the face image corrected in step 315 is registered as an individual face-to-face image (S317). Here, a face image corresponding to the personal name is recorded in the face image DB 4b as shown in FIG.

顔画像を登録すると、次に、モーフィングが可能か否かの判定を行う(S319)。モーフィングは、図19を用いて説明したように、2つの画像を用いて中間画像を生成する画像処理である。このステップでは、図19(a)(c)に示したような、2つの顔画像が有るか否かを判定する。   Once the face image is registered, it is next determined whether morphing is possible (S319). Morphing is image processing for generating an intermediate image using two images as described with reference to FIG. In this step, it is determined whether or not there are two face images as shown in FIGS.

ステップS319における判定の結果、モーフィングが可能であった場合には、角度中間画像を生成する(S321)。ここでは、例えば、図19に示すように、顔画像23と顔画像25から、中間の顔画像24をモーフィングによって生成する。角度中間画像を生成すると、次に、ステップS317と同様に、個人対顔画像として登録する(S323)。ここでは、ステップS321において生成した角度中間画像を、顔画像DB4bに、個人名に対応させて図20に示すように記録する。   If the result of determination in step S319 is that morphing is possible, an angle intermediate image is generated (S321). Here, for example, as shown in FIG. 19, an intermediate face image 24 is generated from the face image 23 and the face image 25 by morphing. Once the angle intermediate image is generated, it is registered as an individual face-to-face image as in step S317 (S323). Here, the angle intermediate image generated in step S321 is recorded in the face image DB 4b in association with the personal name as shown in FIG.

ステップS323において顔画像を登録すると、またはステップS319における判定の結果、モーフィングが不可であった場合、またはステップS307における判定の結果、同一表情・角度の顔画像が既に登録されていた場合には、顔画像データベース作成のフローを終了し、メインルーチンに戻る。   When the face image is registered in step S323, or when the morphing is impossible as a result of the determination in step S319, or when the face image of the same expression / angle is already registered as a result of the determination in step S307, The flow for creating the face image database is terminated, and the process returns to the main routine.

以上、説明したように、本発明の第2実施形態においては、失敗画像が補正処理によって適正画像とすることができない場合には(ステップS105→No)、顔画像DB4bに記録されている補完用参照データを用いて、顔の部分を置き換える画像合成を行うようにしている。このため、逆光等、輝度差が大きい状況において失敗した撮影画像を簡単に復元することができる。   As described above, in the second embodiment of the present invention, when the failed image cannot be made an appropriate image by the correction process (step S105 → No), the supplementary image recorded in the face image DB 4b is used. By using the reference data, image composition for replacing the face portion is performed. For this reason, it is possible to easily restore a captured image that has failed in a situation where the brightness difference is large, such as backlight.

また、本実施形態においては、顔の部分を置き換えるにあたって、失敗の理由が、顔の部分が全体に暗かったのか、顔の部分の明暗の差が大きかったかに応じて、顔画像DB4bから読み出した顔画像の補完参照データの補正を異ならせている。このため、失敗に応じた適切な画像合成を行うことができる。   Further, in the present embodiment, when replacing the face part, the reason for the failure is read from the face image DB 4b depending on whether the face part is entirely dark or the difference in brightness of the face part is large. The correction of the face image complementary reference data is different. For this reason, it is possible to perform appropriate image composition according to the failure.

さらに、本実施形態においては、顔画像DB4bから読み出した顔画像の補完参照データを補正するにあたって、周囲の明るさを考慮して、顔の明るさを補正している。このため、復元された写真が自然な感じとすることができる。   Furthermore, in this embodiment, when correcting the complementary reference data of the face image read from the face image DB 4b, the brightness of the face is corrected in consideration of the surrounding brightness. For this reason, the restored photograph can be made natural.

さらに、本実施形態においては、顔画像DB4bから読み出した顔画像の補完参照データで、顔画像を置き換える際に、顔画像の大きさと目鼻の位置を合わせて合成するようにしている。このため、復元された画像の顔が周囲とマッチして自然な感じとなる。なお、大きさと目鼻の両方を揃えることが望ましいが、いずれか一方だけも構わない。   Further, in the present embodiment, when the face image is replaced with the complementary reference data of the face image read from the face image DB 4b, the size of the face image and the position of the eyes and nose are combined and combined. For this reason, the face of the restored image matches the surroundings and feels natural. Although it is desirable that both the size and the eyes and nose are aligned, only one of them may be used.

さらに、本実施形態においては、撮影によって取得した撮影画像に基づいて、図18ないし図21に示すように、顔画像データベース用の顔画像を生成している。このため、撮影者が普段の撮影を通じて、顔画像データベースを生成することができる。また、同一人物であっても、表情や顔の角度ごとにデータベースに記録するようにしていることから、撮影状況に応じて、最適な顔画像を選択することが可能となる。図18ないし図21に示すような方法により顔画像データベースに種々の顔画像を登録しておいた場合には、ステップS111において類似顔画像を検索する場合に、顔の向きや表情に応じて最適な顔画像を選択することが可能となる。   Further, in the present embodiment, as shown in FIGS. 18 to 21, a face image for a face image database is generated based on a photographed image acquired by photographing. For this reason, the photographer can generate a face image database through normal photographing. In addition, even the same person is recorded in the database for each facial expression and face angle, so that an optimal face image can be selected according to the shooting situation. When various face images are registered in the face image database by the method shown in FIGS. 18 to 21, when searching for a similar face image in step S111, it is optimal according to the face direction and facial expression. It is possible to select a correct face image.

なお、本実施形態において、ステップS101、S103の失敗顔か否かの判定にあたっては、顔部の輝度と背景の平均輝度の差や、また顔部内での輝度差に基づいて行ったが、これに限らず、第1実施形態において説明したような方法等、他の方法によって判定を行うようにしても勿論かまわない。   In this embodiment, the determination of whether or not the face is a failed face in steps S101 and S103 is based on the difference between the luminance of the face and the average luminance of the background, or the luminance difference in the face. Of course, the determination may be made by other methods such as the method described in the first embodiment.

次に、本発明の第3実施形態について、図22を用いて説明する。第1及び第2実施形態においては、撮像部を有するカメラに本発明を適用した例であったが、本実施形態は、カメラ等において撮影した画像をパーソナルコンピュータ(PC)等の記録装置に記録する場合や、記録された撮影画像を読出し、再生表示を行う場合や、等を行う場合に、本発明を適用した例である。   Next, a third embodiment of the present invention will be described with reference to FIG. In the first and second embodiments, the present invention is applied to a camera having an imaging unit. However, in the present embodiment, an image captured by a camera or the like is recorded in a recording device such as a personal computer (PC). This is an example in which the present invention is applied to the case where the image is recorded, when the recorded photographed image is read and reproduced and displayed.

図21は、本実施形態に係わるPC50の構成を示すブロック図である。PC50は、マイクロコンピュータ61、操作入力装置71、表示モニタ72、外部画像入力装置73、記録装置74から構成される。マイクロコンピュータ61は、プログラム等やデータ等を記録する記憶部、制御部等のハードウエアを有し、これらのハードウエアによって、機能が果たされる各手段を有する。各手段としては、顔部判定手段62、ヒストグラム生成手段63、適正度判定手段64、補正手段65、合成手段66を有する。   FIG. 21 is a block diagram showing a configuration of the PC 50 according to the present embodiment. The PC 50 includes a microcomputer 61, an operation input device 71, a display monitor 72, an external image input device 73, and a recording device 74. The microcomputer 61 has hardware such as a storage unit for recording programs and data, a control unit, and the like, and each means for performing functions by these hardware. Each means includes a face determination means 62, a histogram generation means 63, an appropriateness determination means 64, a correction means 65, and a composition means 66.

顔部判定手段62は、外部画像入力装置73から入力した撮影画像の画像データに基づいて、撮影画像の中に顔部が存在するか、また存在した場合には、その大きさや位置、特徴等を判定する。ヒストグラム生成手段63は、画像データに基づいて、図3、図4、図6等に示したようなヒストグラムを生成する。   Based on the image data of the captured image input from the external image input device 73, the face determination means 62 has a face in the captured image, and if it exists, its size, position, feature, etc. Determine. The histogram generation means 63 generates a histogram as shown in FIGS. 3, 4, 6, etc. based on the image data.

適正度判定手段64は、ヒストグラム生成手段63によって生成されたヒストグラムに基づいて、適正画像か否か、言い換えると失敗画像か否かの判定を行う。補正手段65は、適正度判定手段64によって失敗画像と判定された場合であっても明るさの補正で適正画像になる場合には明るさの補正を行い、また撮影画像の顔の部分を記録装置74に記録されている顔画像に置き換える場合には、顔画像の明るさを背景の明るさを考慮して補正する。   Based on the histogram generated by the histogram generation unit 63, the appropriateness determination unit 64 determines whether the image is a proper image, in other words, a failure image. The correction unit 65 corrects the brightness when the image is determined to be a failure image by the appropriateness determination unit 64 and corrects the brightness and records the face portion of the photographed image. When replacing with a face image recorded in the device 74, the brightness of the face image is corrected in consideration of the brightness of the background.

合成手段66は、撮影画像が失敗画像であって、明るさの補正によっては適正画像とならない場合に、記録装置74に記録されている顔画像の中から一致する顔を検索し、撮影画像の顔の部分を、検索された顔画像に置き換える画像合成を行う。   The synthesizing unit 66 searches for a matching face from the face images recorded in the recording device 74 when the photographed image is a failed image and does not become an appropriate image due to brightness correction, and Image synthesis is performed in which the face portion is replaced with the searched face image.

マイクロコンピュータ61には、操作入力装置71、表示モニタ72、外部画像入力装置73、および記録装置74が接続され、データや制御命令の通信が可能である。操作入力装置は、キーボードやマウス等の入力指示装置である。表示モニタ72は、液晶モニタ等の表示装置であり、外部画像入力装置73によって入力した撮影画像や記録装置74に記録されている撮影画像の表示を行う。   An operation input device 71, a display monitor 72, an external image input device 73, and a recording device 74 are connected to the microcomputer 61, and data and control commands can be communicated. The operation input device is an input instruction device such as a keyboard or a mouse. The display monitor 72 is a display device such as a liquid crystal monitor, and displays a captured image input by the external image input device 73 and a captured image recorded in the recording device 74.

外部画像入力装置73は、カメラ10等によって撮影した画像をPC50に入力するための装置であって、USBメモリ等の外部メモリの入力装置、またはインターネット等の通信ラインを通じての入力装置である。   The external image input device 73 is a device for inputting an image taken by the camera 10 or the like to the PC 50, and is an input device of an external memory such as a USB memory or an input device through a communication line such as the Internet.

記録装置74は、PC50に内蔵、または外付けのメモリであって、外部画像入力装置73によって入力した撮影画像や、撮影画像の中から顔画像を利用して作成した顔画像データベース等を記録する。なお、顔画像データベースを有さない場合には、画像合成時に撮影画像から顔の部分を切出し、この顔画像を利用すればよい。   The recording device 74 is an internal or external memory in the PC 50, and records a photographed image input by the external image input device 73, a face image database created using a face image from the photographed image, and the like. . In the case where the face image database is not provided, a face portion may be cut out from the photographed image at the time of image composition and this face image may be used.

本実施形態におけるPC50は、外部画像入力装置73によって、外部から撮影画像の画像データを入力した際に、第1実施形態に係わる図5または図7に示すフローチャートを実行し、撮影画像を補正・合成処理を行った後に、記録装置74に画像データの記録を行う。または、外部から入力した撮影画像の画像データをそのまま記録装置74に記録し、この記録された画像データを読出し、再生する際に、図5または図7に示すフローチャートを実行し、撮影画像を補正・合成処理を施した画像を表示モニタ72に表示する。   The PC 50 according to the present embodiment executes the flowchart shown in FIG. 5 or FIG. 7 according to the first embodiment when the image data of the photographed image is input from the outside by the external image input device 73, and corrects the photographed image. After performing the synthesizing process, image data is recorded in the recording device 74. Alternatively, the image data of the photographed image input from the outside is recorded in the recording device 74 as it is, and when the recorded image data is read and reproduced, the flowchart shown in FIG. 5 or 7 is executed to correct the photographed image. Display the combined image on the display monitor 72.

このように、本発明の第3実施形態に係わるPC50は、撮影画像を記録装置74に記録する際、または記録された撮影画像を再生表示する際に、第1実施形態と同様の画像補正・合成を行うようにしている。このため、撮影画像の顔の部分が黒つぶれや白とび等によって失敗画像となった場合であっても、適正画像に復元することができる。   As described above, the PC 50 according to the third embodiment of the present invention performs the same image correction and correction as in the first embodiment when recording the captured image on the recording device 74 or when reproducing and displaying the recorded captured image. I'm trying to compose. For this reason, even when the face portion of the photographed image becomes a failed image due to blackout or whiteout, it can be restored to an appropriate image.

なお、本実施形態においては、第1実施形態と同様の機能を果たすように、マイクロコンピュータ62内に各手段を設けるようにしたが、これに限らず、第2実施形態と同様の機能を果たすように各手段を設けるようにしても勿論かまわない。   In the present embodiment, each means is provided in the microcomputer 62 so as to perform the same function as in the first embodiment. However, the present invention is not limited to this, and the same function as in the second embodiment is performed. Of course, each means may be provided.

また、本実施形態においては、PC50がマイクロコンピュータ61やその他の装置を具備するようにしたが、一部の装置、例えば、記録装置74等を外部のサーバー内に設けるようにしても勿論かまわない。   In the present embodiment, the PC 50 is provided with the microcomputer 61 and other devices. However, it is of course possible to provide some devices, for example, the recording device 74 in an external server. .

以上説明したように、本発明の各実施形態やその変形例においては、逆光等、輝度差が大きい状況において黒つぶれや白とびによって失敗した撮影画像について、画像の明るさを補正することが可能な場合には、この補正を行い適正画像とする。また、極度の黒つぶれや極度の白とびのために、画像の明るさを補正することによって適正画像にすることができない場合には、データベースに記録されている同一人物の顔部に置き換える画像合成を行うことによって適正画像としている。このため、簡単に失敗した撮影画像を復元することができる。   As described above, in each embodiment of the present invention and its modifications, it is possible to correct the brightness of a photographed image that has failed due to blackout or overexposure in a situation where the luminance difference is large such as backlight. If this is the case, this correction is performed to obtain an appropriate image. Also, if the image cannot be made appropriate by correcting the brightness of the image due to extreme blackout or excessive whiteout, the image composition is replaced with the face of the same person recorded in the database. The proper image is obtained by performing For this reason, it is possible to easily restore a failed photographed image.

また、データベースに記録されている同一人物の顔部に置き換える画像合成を行う際には、背景の明るさを考慮して、顔部の明るさを補正し、合成用の顔画像を生成している。このため、周囲の明るさと違和感のない合成画像を生成することができる。   In addition, when synthesizing an image to be replaced with the face of the same person recorded in the database, the brightness of the face is corrected in consideration of the brightness of the background, and a face image for synthesis is generated. Yes. For this reason, it is possible to generate a composite image that does not have a sense of incongruity with ambient brightness.

なお、本発明の各実施形態や変形例においては、データベースに記憶されている顔画像に対して、明るさ補正を施してから、撮影画像の顔の部分を置き換える画像合成をおこなっている。しかし、これに限らず、撮影画像の顔の部分を、データベースに記憶されている顔画像に置き換えてから、顔の部分の明るさを補正するようにしてもよい。また、顔の部分に対して明るさの補正を行う以外にも、他の方法として、顔の部分の周囲の被写体に対する明るさを補正し、全体として、顔の部分が目立たなくなるような補正を施すようにしてもよい。   In each embodiment and modification of the present invention, image synthesis is performed to replace the face portion of the photographed image after performing brightness correction on the face image stored in the database. However, the present invention is not limited to this, and the brightness of the face portion may be corrected after the face portion of the photographed image is replaced with the face image stored in the database. In addition to correcting the brightness of the face part, another method is to correct the brightness of the subject around the face part so that the face part becomes inconspicuous as a whole. You may make it give.

また、本発明の各実施形態や変形例においては、予め、顔の部分のデータベース(例えば、図20参照)を生成し、これを記録部4(顔画像DB4b)に記憶している。しかし、顔の部分のデータベースとしては、記録部4に記録されている撮影画像そのものを使用し、顔の部分について画像合成する際に、記録されている撮影画像の中から顔の部分を切出して画像合成を行うようにしても勿論かまわない。   In each embodiment and modification of the present invention, a face database (for example, see FIG. 20) is generated in advance and stored in the recording unit 4 (face image DB 4b). However, as the face part database, the photographed image itself recorded in the recording unit 4 is used, and when the face part image is synthesized, the face part is cut out from the recorded photographed image. Of course, it does not matter if image synthesis is performed.

さらに、本発明の各実施形態や変形例においては、人間の顔に対して、適正画像となるように、補正や合成を行っていたが、ペット等の動物に対しても、同様に適用することができる。この場合には、ペット等の動物の顔を識別するためのデータを用いればよい。   Furthermore, in each embodiment and modification of the present invention, correction and composition are performed so that a human face is an appropriate image, but the same applies to animals such as pets. be able to. In this case, data for identifying the face of an animal such as a pet may be used.

また、本発明の各実施形態においては、撮影のための機器として、デジタルカメラを用いて説明したが、カメラとしては、デジタル一眼レフカメラでもコンパクトデジタルカメラでもよく、ビデオカメラ、ムービーカメラのような動画用のカメラでもよく、さらに、携帯電話や携帯情報端末(PDA:Personal Digital Assist)、ゲーム機器等に内蔵されるカメラでも構わない。   In each embodiment of the present invention, a digital camera has been described as an apparatus for photographing. However, the camera may be a digital single lens reflex camera or a compact digital camera, such as a video camera or a movie camera. It may be a camera for moving images, or may be a camera built in a mobile phone, a personal digital assistant (PDA), a game device, or the like.

本発明は、上記実施形態にそのまま限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素の幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, you may delete some components of all the components shown by embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

1・・・信号処理及び制御部、1b・・・露出不良判定部、2・・・撮像部、3・・・顔検出部、4・・・記録部、4b・・・顔画像DB、5・・・ストロボ部、6・・・操作判定部、7・・・音声収録部、8・・・表示部、9・・・時計部、10・・・カメラ、11・・・フラッシュメモリ、12・・・時計部、21・・・被写体A、22・・・被写体B、22a・・・顔画像、22b・・・顔画像、23・・・顔画像、23a・・・正規化顔画像、24・・・顔画像、25・・・顔画像、27・・・鼻筋線、50・・・パーソナルコンピュータ(PC)、61・・・マイクロコンピュータ、62・・・顔部判定手段、63・・・ヒストグラム生成手段、64・・・適正度判定手段、65・・・補正手段、66・・・合成手段、71・・・操作入力装置、72・・・表示モニタ、73・・・外部画像入力装置、74・・・記録装置 DESCRIPTION OF SYMBOLS 1 ... Signal processing and control part, 1b ... Poor exposure determination part, 2 ... Imaging part, 3 ... Face detection part, 4 ... Recording part, 4b ... Face image DB, 5 ... Strobe unit, 6 ... Operation determination unit, 7 ... Audio recording unit, 8 ... Display unit, 9 ... Clock unit, 10 ... Camera, 11 ... Flash memory, 12 ... clock part, 21 ... subject A, 22 ... subject B, 22a ... face image, 22b ... face image, 23 ... face image, 23a ... normalized face image, 24 ... Face image, 25 ... Face image, 27 ... Nose lines, 50 ... Personal computer (PC), 61 ... Microcomputer, 62 ... Face determination means, 63 ..・ Histogram generation means, 64... Appropriateness determination means, 65... Correction means, 66. Work input device, 72 ... display monitor, 73 ... external image input device, 74 ... recording device

Claims (11)

顔の部分を含む画像を記憶する顔画像データベースと、
撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定する適正画像判定部と、
上記適正画像判定部によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正する第1補正部と、
上記適正画像判定部によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、上記顔画像データベースの中から上記失敗画像の中の顔と一致または類似する顔画像を検索し、この検索した顔画像の明るさを補正する第2補正部と、
上記第2補正部によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行う画像合成部と、
を有することを特徴とする顔画像合成装置。
A face image database for storing an image including a face portion;
An appropriate image determination unit for determining whether the image is appropriate based on the brightness of the face portion in the captured image;
A first correction unit that corrects the captured image when the image is determined to be a failed image by the appropriate image determination unit and becomes an appropriate image by correcting the brightness of the captured image;
When it is determined that the image is a failed image by the appropriate image determination unit, if the image cannot be made an appropriate image by correcting the brightness of the captured image, it matches the face in the failed image from the face image database. Alternatively, a second correction unit that searches for a similar face image and corrects the brightness of the searched face image;
An image composition unit for performing image composition for replacing the face image corrected by the second correction unit with the face image of the failed image;
A face image synthesizing device characterized by comprising:
上記適正画像判定部は、上記撮影画像のヒストグラムを生成し、このヒストグラムに基づいて判定することを特徴とする請求項に記載の顔画像合成装置。 The face image synthesizer according to claim 1 , wherein the appropriate image determination unit generates a histogram of the captured image and makes a determination based on the histogram. 上記適正画像判定部は、上記撮影画像の顔の部分の平均的な明るさと背景の明るさの差に基づいて判定することを特徴とする請求項に記載の顔画像合成装置。 The face image composition device according to claim 1 , wherein the appropriate image determination unit makes a determination based on a difference between an average brightness of a face portion of the photographed image and a brightness of a background. 上記適正画像判定部は、上記撮影画像の顔の部分の中の明暗の差に基づいて判定することを特徴とする請求項に記載の顔画像合成装置。 The face image synthesizing apparatus according to claim 1 , wherein the appropriate image determining unit determines based on a difference in brightness in a face portion of the photographed image. 上記第2補正部は、上記検索した顔画像が、上記背景の明るさから、上記撮影画像の顔の部分の平均的な明るさと上記背景の明るさの差に基づく補正量を減算した明るさとなるように補正することを特徴とする請求項に記載の顔画像合成装置。 The second correction unit has a brightness obtained by subtracting a correction amount based on a difference between an average brightness of a face portion of the photographed image and a brightness of the background from the brightness of the background. face image synthesizing apparatus according to claim 1, characterized in that the corrected so that. 上記第2補正部は、上記撮影画像の顔の部分の中の明暗の差に基づいて失敗画像と判定された場合には、上記検索した顔画像に対して、上記顔の部分の中の明暗差を圧縮するように補正することを特徴とする請求項に記載の顔画像合成装置。 If the second correction unit determines that the image is a failure image based on the difference in brightness in the face portion of the photographed image, the second correction unit applies the brightness and darkness in the face portion to the searched face image. The face image composition apparatus according to claim 1 , wherein the difference is corrected so as to be compressed. 上記合成部は、上記第2補正部によって補正された顔画像の目鼻位置を、上記失敗画像の顔画像の目鼻位置と一致するように画像を置き換えることを特徴とする請求項に記載の顔画像合成装置。 2. The face according to claim 1 , wherein the synthesis unit replaces the image so that the eye-nose position of the face image corrected by the second correction unit matches the eye-nose position of the face image of the failure image. Image composition device. 上記データベースは、人物ごとに、表情と顔の向きが異なる顔画像を記憶することを特徴とする請求項に記載の顔画像合成装置。 The face image synthesizing apparatus according to claim 1 , wherein the database stores face images having different expressions and face orientations for each person. さらに、画像を表示する表示部と、
上記表示部に表示する画像の表示制御部と、
を有し、
上記表示制御部は、上記撮影画像の顔の部分を拡大表示し、この拡大表示した顔の部分を、上記合成部によって合成された顔画像を拡大表示し、この合成された顔画像を含む撮影画像の元のサイズに縮小表示することを特徴とする請求項に記載の顔画像合成装置。
And a display unit for displaying an image;
A display control unit for an image to be displayed on the display unit;
Have
The display control unit enlarges and displays the face portion of the photographed image, enlarges and displays the face image synthesized by the synthesis unit, and shoots including the synthesized face image. The face image synthesizing apparatus according to claim 1 , wherein the face image synthesizing apparatus displays the reduced image to the original size.
撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定し、
上記適正画像か否かの判定によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正し、
上記適正画像か否かの判定によって失敗画像と判定され、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、顔の部分を含む画像を記憶する顔画像データベースの中から上記失敗画像の中の顔と一致する顔画像を検索し、この検索した顔画像の明るさを補正し、
上記補正によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行う、
ことを特徴とする顔画像合成方法。
Based on the brightness of the face part in the captured image, determine whether it is an appropriate image,
When it is determined as a failed image by determining whether or not the image is appropriate, if the image becomes a proper image by correcting the brightness of the captured image, the captured image is corrected,
If it is determined that the image is a failure image by determining whether the image is appropriate and cannot be made an appropriate image by correcting the brightness of the captured image, the face image database that stores an image including a face portion is used. Search for a face image that matches the face in the failed image, correct the brightness of the searched face image,
Performing image synthesis to replace the face image corrected by the correction with the face image of the failed image;
A face image synthesis method characterized by the above.
顔画像データベースを有するコンピュータにおいて、顔画像合成を行わせるコンピュータプログラムにおいて、
撮影画像の中で顔の部分の明るさに基づいて、適正画像か否かを判定するステップと、
上記適正画像か否かの判定によって失敗画像と判定された場合に、上記撮影画像の明るさの補正によって適正画像となる場合に、上記撮影画像を補正するステップと、
上記適正画像か否かの判定によって失敗画像と判定され、上記撮影画像の明るさの補正によって適正画像とすることはできない場合に、上記顔画像データベースの中から上記失敗画像の中の顔と一致する顔画像を検索し、この検索した顔画像の明るさを補正するステップと、
上記補正によって補正された顔画像を、上記失敗画像の顔画像と置き換える画像合成を行うステップと、
をコンピュータに実行させることを特徴とするプログラム。
In a computer program for performing face image synthesis in a computer having a face image database,
Determining whether the image is appropriate based on the brightness of the face portion in the captured image;
A step of correcting the photographed image when it is determined that the image is a failure image by determining whether or not the image is a proper image, and a correct image is obtained by correcting brightness of the photographed image;
If the image is determined to be a failed image by determining whether or not the image is appropriate and cannot be made the correct image by correcting the brightness of the captured image, it matches the face in the failed image from the face image database. Searching for a face image to be corrected, correcting the brightness of the searched face image,
Performing image synthesis for replacing the face image corrected by the correction with the face image of the failed image;
A program that causes a computer to execute.
JP2010088117A 2010-04-06 2010-04-06 Facial image synthesis device, facial image synthesis method, and program Active JP5484994B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010088117A JP5484994B2 (en) 2010-04-06 2010-04-06 Facial image synthesis device, facial image synthesis method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010088117A JP5484994B2 (en) 2010-04-06 2010-04-06 Facial image synthesis device, facial image synthesis method, and program

Publications (2)

Publication Number Publication Date
JP2011223173A JP2011223173A (en) 2011-11-04
JP5484994B2 true JP5484994B2 (en) 2014-05-07

Family

ID=45039610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010088117A Active JP5484994B2 (en) 2010-04-06 2010-04-06 Facial image synthesis device, facial image synthesis method, and program

Country Status (1)

Country Link
JP (1) JP5484994B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6460510B2 (en) * 2012-08-10 2019-01-30 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
KR101447820B1 (en) * 2013-05-08 2014-10-13 중앙대학교 산학협력단 Image processing method and image processing system using the same
WO2018096661A1 (en) 2016-11-25 2018-05-31 日本電気株式会社 Image generation device, face verification device, image generation method, and recording medium in which program is stored
TW201833802A (en) * 2017-03-14 2018-09-16 日商賽爾科技股份有限公司 Machine learning device and machine learning program
EP4283558A1 (en) 2021-01-22 2023-11-29 Logic and Design Co., Ltd. Image processing method
JP7218769B2 (en) * 2021-02-04 2023-02-07 日本電気株式会社 Image generation device, image generation method, and program
JP7194902B1 (en) 2022-05-25 2022-12-23 茂男 植木 Image sensor modules for film cameras

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002190009A (en) * 2000-12-22 2002-07-05 Minolta Co Ltd Electronic album device and computer readable recording medium recording electronic album program
JP4853320B2 (en) * 2007-02-15 2012-01-11 ソニー株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2011223173A (en) 2011-11-04

Similar Documents

Publication Publication Date Title
JP5484994B2 (en) Facial image synthesis device, facial image synthesis method, and program
US10074165B2 (en) Image composition device, image composition method, and recording medium
CN108933899B (en) Panorama shooting method, device, terminal and computer readable storage medium
JP5232669B2 (en) camera
JP4861952B2 (en) Image processing apparatus and imaging apparatus
WO2017016069A1 (en) Photographing method and terminal
WO2019072190A1 (en) Image processing method, electronic apparatus, and computer readable storage medium
CN108810406B (en) Portrait light effect processing method, device, terminal and computer readable storage medium
JP2010183317A (en) Imaging device, image composition and display device, image composition and display method, and program
KR20130071793A (en) Digital photographing apparatus splay apparatus and control method thereof
JP2019106045A (en) Image processing device, method, and program
JP2016213718A (en) Image processing apparatus, image processing method, program, and storage medium
CN113905182B (en) Shooting method and equipment
CN107424117B (en) Image beautifying method and device, computer readable storage medium and computer equipment
CN103685928B (en) Image processing apparatus and image processing method
CN108734754A (en) Image processing method and device
JP2009065269A (en) Image processor and image processing method
JP5009204B2 (en) Image capturing apparatus and image composition method in image capturing apparatus
JP2010021795A (en) Image capturing apparatus, correction controller, correction control method, and program
CN104144286B (en) Filming apparatus and image pickup method
CN108282622B (en) Photo shooting method and device
JP2017152866A (en) Image processing system and image processing method
JP6033006B2 (en) Image processing apparatus, control method thereof, control program, and imaging apparatus
Cohen et al. The moment camera
JP2013168969A (en) Image display method, and image display device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130306

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140219

R151 Written notification of patent or utility model registration

Ref document number: 5484994

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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