JP2012109896A - Image processing device and image processing method - Google Patents
Image processing device and image processing method Download PDFInfo
- Publication number
- JP2012109896A JP2012109896A JP2010258644A JP2010258644A JP2012109896A JP 2012109896 A JP2012109896 A JP 2012109896A JP 2010258644 A JP2010258644 A JP 2010258644A JP 2010258644 A JP2010258644 A JP 2010258644A JP 2012109896 A JP2012109896 A JP 2012109896A
- Authority
- JP
- Japan
- Prior art keywords
- face
- information
- area
- printer
- image data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
この発明は、画像データに付加される顔情報および該画像データから検出した顔情報に基づいて画像データを補正する画像処理装置および画像処理方法に関するものである。 The present invention relates to an image processing apparatus and an image processing method for correcting image data based on face information added to image data and face information detected from the image data.
近年、デジタルカメラで撮影時に画像を解析して補正を行うことが多くなってきた。その補正処理の一つとして、顔認識処理がある。これは、被写体に人物が含まれている際に画像から人物の顔を認識し、その認識した顔に合わせてオートフォーカスや露出を制御する機能である。また、顔認識機能を有するデジタルカメラでは、顔認識処理により得られる顔情報(顔オブジェクト情報や顔検出結果などと称することもある)を画像データに付加することが提案されている(例えば特許文献1参照)。そして、この特許文献1に記載の印刷装置では、画像データに付加される顔情報に基づいて画像データに対して色補正が実行され、色補正済の画像が印刷される。このように、デジタルカメラによる顔認識結果を利用して印刷装置側で独自に補正をかける技術が知られている。
In recent years, digital images have been frequently analyzed and corrected during shooting. One of the correction processes is a face recognition process. This is a function for recognizing a person's face from an image when the subject includes a person and controlling autofocus and exposure according to the recognized face. Further, in a digital camera having a face recognition function, it has been proposed to add face information (sometimes referred to as face object information or a face detection result) obtained by face recognition processing to image data (for example, Patent Documents). 1). In the printing apparatus described in
ところで、デジタルカメラの顔認識によって被写体に含まれる人物の顔の全部が完全かつ正確に認識される保証はない。このため、デジタルカメラ側での顔認識の補佐あるいは再確認を行う意味で印刷装置側でも独自に顔認識を行うことは有効である。その一方で、デジタルカメラ側での顔認識処理により検出された顔領域(以下、「カメラ顔領域」という)と、印刷装置側での顔認識処理により検出された顔領域(以下「プリンター顔領域」という)とが重なり、同一人物の顔を検出しているにもかかわらず、2種類の顔情報(つまり、カメラ顔領域を特定するカメラ側顔情報と、プリンター顔領域を特定するプリンター側顔情報)が併存することがある。このような場合、これら2種類の顔情報をどのように取り扱うことで適正な補正を行うことができるか十分に検討されていなかった。 By the way, there is no guarantee that the whole face of a person included in the subject is completely and accurately recognized by the face recognition of the digital camera. For this reason, it is effective to perform face recognition independently on the printing apparatus side in the sense of assisting or reconfirming face recognition on the digital camera side. On the other hand, a face area detected by face recognition processing on the digital camera side (hereinafter referred to as “camera face area”) and a face area detected by face recognition processing on the printing apparatus side (hereinafter referred to as “printer face area”). ”) And two types of face information (that is, camera-side face information that identifies the camera face area and printer-side face that identifies the printer face area, even though the face of the same person is detected) Information) may coexist. In such a case, it has not been sufficiently studied how appropriate correction can be performed by handling these two types of face information.
この発明にかかるいくつかの態様は、画像データに付加される顔情報および該画像データから検出した顔情報に基づいて画像データを補正する画像処理装置および画像処理方法に、顔情報を適正に選択して画像データを補正することを目的とする。 According to some aspects of the present invention, face information is appropriately selected for an image processing apparatus and an image processing method for correcting image data based on face information added to image data and face information detected from the image data. The purpose is to correct the image data.
本発明の第1の態様は、画像データから人物の顔を認識する顔認識処理を実行して第1顔情報を検出する顔情報検出部と、画像データに付加される第2顔情報を取得する顔情報取得部と、顔情報を含む補正基礎情報に基づいて画像データを補正する補正部と、第1顔情報で特定される第1顔領域が第2顔情報で特定される第2顔領域と重なるときには、第1顔領域と重なる第2顔領域を特定する第2顔情報を補正基礎情報に含める情報選択部とを備えることを特徴としている。 According to a first aspect of the present invention, a face information detection unit that detects a first face information by executing face recognition processing for recognizing a human face from image data, and acquires second face information added to the image data. A face information acquisition unit that performs correction, a correction unit that corrects image data based on correction basic information including face information, and a second face in which the first face region specified by the first face information is specified by the second face information And an information selection unit that includes, in the correction basic information, second face information that identifies the second face area that overlaps the first face area.
また、本発明の第2の態様は、画像データから人物の顔を認識する顔認識処理を実行して第1顔情報を検出する第1工程と、画像データに付加される第2顔情報を取得する第2工程と、第1顔情報で特定される第1顔領域が第2顔情報で特定される第2顔領域と重なるときには第1顔領域が第2顔領域に重なる第2顔情報に基づいて画像データを補正する第3工程とを備えることを特徴としている。 According to a second aspect of the present invention, a first step of detecting face information by executing face recognition processing for recognizing a human face from image data, and second face information added to the image data are performed. The second step of acquiring and the second face information in which the first face area overlaps the second face area when the first face area specified by the first face information overlaps the second face area specified by the second face information And a third step of correcting the image data based on the above.
このように構成された発明(画像処理装置および画像処理方法)では、画像データから人物の顔を認識する顔認識処理を実行して第1顔情報を検出するとともに、画像データに付加される第2顔情報を取得している。このため、同一人物の顔に対して2種類の顔情報が存在し、第1顔情報で特定される第1顔領域が第2顔情報により特定される第2顔領域と重なることがある。この場合、両顔領域が完全に一致しているのであれば、いずれの顔情報を用いてもよいのであるが、次のような場合、第1顔領域が第2顔領域と不自然に重なることがある。例えば、第1顔情報の誤検出が発生したり、第2顔情報に対応する人物と異なる被写体の顔を検出してしまうことがあり、これらの要因により第2顔領域と不自然に重なるものをそのまま画像データを補正するための情報、つまり補正基礎情報として利用すると、既に実行された顔認識の補佐あるいは再確認を行う技術的意味が失われてしまう。そこで、本発明では、上記のように第1顔領域が第2顔領域と重なる場合には、第2顔領域を特定する第2顔情報に基づき画像データを補正している。 In the invention (image processing apparatus and image processing method) configured as described above, first face information is detected by executing face recognition processing for recognizing a person's face from image data, and is added to the image data. 2 Face information is acquired. For this reason, there are two types of face information for the face of the same person, and the first face area specified by the first face information may overlap the second face area specified by the second face information. In this case, any face information may be used as long as both face areas completely match, but in the following case, the first face area unnaturally overlaps with the second face area. Sometimes. For example, erroneous detection of the first face information may occur, or a face of a subject different from the person corresponding to the second face information may be detected, and these factors cause an unnatural overlap with the second face area Is used as information for correcting image data as it is, that is, as basic correction information, the technical meaning of assisting or reconfirming the face recognition that has already been performed is lost. Therefore, in the present invention, when the first face area overlaps the second face area as described above, the image data is corrected based on the second face information for specifying the second face area.
ここで、第1顔情報で特定される第1顔領域に第2顔領域と重ならない非重複領域が含まれるときには、非重複領域を特定する第1顔情報を補正基礎情報に加えてもよく、これにより既に実行された顔認識時点では認識されていなかった人物の顔も考慮して画像データを補正することができる。 Here, when the first face area specified by the first face information includes a non-overlapping area that does not overlap the second face area, the first face information specifying the non-overlapping area may be added to the correction basic information. Thus, the image data can be corrected in consideration of the face of a person who has not been recognized at the time of face recognition already performed.
また、非重複領域が適正なものでない場合(例えば非重複領域の顔明度が適正顔明度範囲を外れる、あるいは非重複領域の顔サイズが適正顔サイズ範囲を外れる等の場合)、非重複領域を特定する第1顔情報を補正基礎情報に加えると、画像データの補正に悪影響を及ぼすおそれがある。そこで、このような場合には、非重複領域を特定する第1顔情報を補正基礎情報を含めないことが望ましい。 In addition, when the non-overlapping area is not appropriate (for example, when the face brightness of the non-overlapping area is out of the appropriate face brightness range, or the face size of the non-overlapping area is out of the appropriate face size range) If the first face information to be specified is added to the correction basic information, there is a possibility that the correction of the image data is adversely affected. Therefore, in such a case, it is desirable not to include the correction basic information in the first face information that identifies the non-overlapping area.
また、人物の顔であるか否かの判別要素として顔領域の色相を用いることができる。例えばデジタルカメラで人物を撮像する際、ピント合わせを行った後で人物が動いてしまうと、第2顔情報よりも第1顔情報を補正基礎情報として用いるのが好ましい。そこで、第2顔領域と重なる第1顔領域の色相が肌色であるときには、第2顔領域と重なる第1顔領域を特定する顔情報を補正基礎情報に加えるのが好適となる。一方、第1顔領域と重なる第2顔領域の色相が肌色でないときには、第1顔領域と重なる第2顔領域を特定する顔情報を補正基礎情報から削除するのが好適となる。 Further, the hue of the face area can be used as a determination element for determining whether the face is a person. For example, if a person moves after focusing on a digital camera, it is preferable to use the first face information as the basic correction information rather than the second face information. Therefore, when the hue of the first face area that overlaps the second face area is skin color, it is preferable to add face information that specifies the first face area that overlaps the second face area to the correction basic information. On the other hand, when the hue of the second face area that overlaps the first face area is not skin color, it is preferable to delete the face information that specifies the second face area that overlaps the first face area from the correction basic information.
なお、第1顔領域と第2顔領域との重なりについては、例えば第1顔領域と、第2顔領域との重なり部分の面積によって求めることができる。より具体的には、重なり部分の面積が第2顔領域の面積の40%以上であるときに第1顔情報が第2顔情報に一致すると判別することができる。 Note that the overlap between the first face area and the second face area can be obtained by, for example, the area of the overlapping portion between the first face area and the second face area. More specifically, it can be determined that the first face information matches the second face information when the area of the overlapping portion is 40% or more of the area of the second face region.
図1は、本発明にかかる画像処理装置の第1実施形態を用いた印刷システムを示す図である。この印刷システムは、デジタルカメラ200の撮影により取得された画像データを、メモリカードM、USB(Universal Serial Bus)ケーブルや無線LAN(Local Area Network)等によって印刷装置100に転送し、印刷装置100で印刷するものである。すなわち、ここではユーザーがデジタルカメラ200で画像を撮影して画像データを生成し、その画像データをそのまま印刷装置100で読み込んで印刷する、いわゆるダイレクト印刷を想定しているが、本発明を適用可能な印刷システムはこれに限定されるものではない。つまり、デジタルカメラ200で生成した画像データをパーソナルコンピューターや携帯電話などに取り込み、パーソナルコンピューターから印刷装置100に画像データを送信して印刷する印刷システムにも本発明を適用することは可能である。
FIG. 1 is a diagram showing a printing system using the first embodiment of the image processing apparatus according to the present invention. In this printing system, image data acquired by photographing with the
デジタルカメラ200では、同図に示すように、CPU(Central Processing Unit)201、ROM(Read Only Memory)202、RAM(Random Access Memory)203、CCD(Charge Coupled Device)204、GP(Graphic Processor)205およびI/F(Interface)206がバス207を介して相互に接続され、これらの間で情報の授受が可能となっている。そして、CPU201はROM202に格納されているプログラムに応じて各種演算処理を実行しながらデジタルカメラ200の制御を行う。このとき一時的に必要となるデータはRAM203に格納される。また、CCD204は、光学系208によって集光された被写体からの光学像を電気信号に変換して出力する。この光学系208は、複数のレンズおよびアクチュエータによって構成されており、アクチュエータによってフォーカス等を調整しながら被写体の光学像を複数のレンズによってCCD204の受光面に結像する。さらに、GP205は、CPU201から供給される表示命令に基づいて表示用の画像処理を実行し、得られた表示用画像データをLCD(Liquid Crystal Display)209に供給して表示させる。
In the
I/F206はデジタルカメラ200の入出力機能を提供するものであり、操作ボタン210、ジャイロセンサー211およびカードI/F回路212の間で情報を授受する際に、データの表現形式を適宜変換する装置である。I/F206に接続される操作ボタン210には、電源、モード切替え、シャッターなどのボタンや、各種機能を設定できる入力手段があり、これらによってユーザーはデジタルカメラ200を任意に制御して動作させることが可能となっている。また、ジャイロセンサー211はデジタルカメラ200によって被写体を撮影した際のカメラ本体の角度(水平面に対する角度)を示す信号を生成して出力する。デジタルカメラ200は、上記したカメラ本体の角度を含め、撮影時における種々の情報(例えば、露光、被写体等に関する情報)を、後述するExif(Exchangeable Image File Format)情報として画像データに付加した画像ファイルを生成することができる構造となっている。
The I /
また、カードI/F回路212はカードスロット213に挿入されたメモリカードMとの間で情報を読み書きするためのインタフェースである。さらに、I/F206は図示を省略するUSB、無線LANなどの外部機器との接続機能も有しており、有線または無線にて印刷装置100との間で画像ファイルの授受が可能となっている。なお、デジタルカメラ200で作成され、印刷装置100に与えられる画像ファイル(画像データ+Exif情報)については、後で詳述する。
The card I / F circuit 212 is an interface for reading / writing information from / to the memory card M inserted in the
印刷装置100はデジタルカメラ200で撮像された画像を印刷する装置であり、次のように構成されている。印刷装置100では、CPU101、ROM102、RAM103、EEPROM(Electrically Erasable and Programmable ROM)104、GP105およびI/F106がバス107を介して相互に接続され、これらの間で情報の授受が可能となっている。CPU101はROM102およびEEPROM104に格納されているプログラムに応じて各種演算処理を実行するとともに印刷装置100の各部を制御し、本発明の「顔情報検出部」、「顔情報取得部」、「情報選択部」および「補正部」として機能する。また、CPU101が実行対象とするプログラムやデータについてはRAM103に一時的に格納される一方、印刷装置の電源が切断された後も保持しておくデータ等についてはEEPROM104に格納される。さらに、CPU101は必要に応じてGP105に対して表示命令を与え、この表示命令に応じてGP105が表示用の画像処理を実行し、その処理結果をLCD108に供給して表示させる。
The
I/F106は、操作ボタン109、カードI/F回路110およびプリンターエンジンコントローラー111の間で情報を授受する際に、データの表現形式を適宜変換する装置である。印刷装置100では、操作ボタン109は印刷装置100のメニュー選択等を行う時に押されるように構成されている。また、カードI/F回路110は、カードスロット112と接続されており、このカードスロット112に挿入されたメモリカードMからデジタルカメラ200によって生成された画像ファイルを読み出す。なお、I/F106は、図示を省略するUSB、無線LANなどの外部機器との接続機能も有しており、有線通信または無線通信にてデジタルカメラ200との間で画像ファイルの授受が可能となっている。
The I /
そして、印刷装置100は、メモリカードMを介して、あるいはデータ通信により画像データを受け取ると、CPU101により種々の処理を行うとともにプリンターエンジンコントローラー111によりプリンターエンジン113を制御し、これによって画像データに対応する画像を印刷する。以下、図2ないし図4に基づき画像ファイルの構成を説明した上で、本実施形態における画像処理動作および印刷動作について図4ないし図7を参照しつつ詳述する。
When the
図2は上記のように構成されたデジタルカメラで作成される画像ファイルの一例を示す図である。また、図3は図2の部分拡大図である。この実施形態では、デジタルカメラ200はCCD204で撮像された画像データをRAM203に格納する。また、デジタルカメラ200は、被写体に人物が含まれているときには顔認識処理を行う(顔認識方式については従来より数多く提案されており、それらのうちいずれの方式を採用してもよい)。なお、本実施形態では、顔認識処理により検出される顔認識結果は、図4(a)に示すような座標情報が顔情報として表現される。すなわち、同図(a)に示すように、画像データは所定の画像幅(Width)と画像高さ(Height)の画素で構成されており、Xが横軸、Yが縦軸を表しており、左上が原点(0,0)である。そして、画像データから顔が検出されると、両目端が入る間隔(顔サイズ)を1辺とする正方形の顔領域(または顔矩形という)FRcを左上(LT)、左下(LB)、右上(RT)、右下(RB)の4点の座標で囲まれる領域で表し、顔領域FRcを示す座標、つまり顔座標を、認識した顔の個数(つまりカメラ顔個数)NcとともにRAM203に格納する。
FIG. 2 is a diagram showing an example of an image file created by the digital camera configured as described above. FIG. 3 is a partially enlarged view of FIG. In this embodiment, the
また、本明細書では、後で説明するように、印刷装置100においてもデジタルカメラ200での顔認識と同様に顔認識を行って顔座標を求めるため、デジタルカメラ200での顔認識により得られる顔座標を「カメラ顔座標」と称し、左上(LTc)、左下(LBc)、右上(RTc)、右下(RBc)で示す。また、顔認識処理により複数個の顔が検出される場合もあるため、第n番目のカメラ顔座標を左上(LTnc)、左下(LBnc)、右上(RTnc)、右下(RBnc)で示す。また、後述するように印刷装置100の顔認識処理により検出される顔座標については「プリンター顔座標」と称し、第n番目のプリンター顔座標については、左上(LTnp)、左下(LBnp)、右上(RTnp)、右下(RBnp)で示す。図4(a)では、デジタルカメラ200での顔認識結果の一例として、カメラ側での顔認識処理によって二人の人物の顔が検出され、各人物のカメラ顔座標(LT1c,LB1c,RT1c,RB1c)、(LT2c,LB2c,RT2c,RB2c)が図示されている。
In the present specification, as will be described later, the
また、この実施形態では、上記のように画像データ、顔個数および顔座標などをRAM203に格納しているが、その記録方式としてディジタルスチルカメラ用画像ファイルフォーマット規格Exif Ver.2.2.1を使用している。このExif画像ファイルの構造は、基本的には通常のJPEG(Joint Photographic Experts Group)画像形式そのものであり、その中にサムネイル画像や撮影関連データ等のデータをJPEGの規約に準拠した形で埋め込んだものである。
In this embodiment, the image data, the number of faces, the face coordinates, and the like are stored in the
本実施形態で使用する画像ファイルは、図2の左側部分に示すように、最初にSOI(Start of image)301がある。その後に、APP1(アプリケーション・マーカーセグメント)302、DQT(Define Quantization Table)303、DHT(Define Huffman Table)304の順となっている。さらにその後に、SOF(Start of Frame)305、SOS(Start of Stream)マーカー306、圧縮データ(Compress Data)307の順となっている。最後にEOI(End of Image)308がある。これらのうちAPP1はアプリケーションプログラムで使用するためのデータ領域として図2の中央部分に示す構造を有している。APP1の構造では、先頭にAPP1 Marker領域302aがある。そして、その次にLength領域302bがある。
The image file used in the present embodiment has an SOI (Start of image) 301 first, as shown in the left part of FIG. Thereafter, APP1 (application marker segment) 302, DQT (Define Quantization Table) 303, and DHT (Define Huffman Table) 304 are arranged in this order. After that, SOF (Start of Frame) 305, SOS (Start of Stream)
Length領域302bに続くデータの最初の6バイトの領域302cでは、識別子としてASCII文字の“Exif"が、その次に2バイトの0x00が続く。そこからTiff(Tagged Image File Format)形式でデータが格納されている。Tiff形式の最初の8バイトはTiffヘッダー(Header)領域302dである。
In the first 6-
また、Tiffヘッダー領域302dの次の0th IFD(IFD of main image)領域302eに、同図の右側部分に示すように、画像幅、画像高さ等の画像関連情報が格納される。そして、0th IFDの次に0th IFD Value領域302fがある。さらに、その次にExif IFD領域302gが設けられ、露出時間、Fナンバーなどの撮影関連情報が格納される。また、Exif IFD領域302gにExif IFD Value領域302hがある。なお、現在のところ、顔認識処理により検出される顔個数NcとNc個の顔座標をExifタグに書き込む規格は規定されていないが、本実施形態では顔個数NcがExif IFD領域302gに書き込まれ、Nc個の顔座標がExif IFD Value領域302hに書き込まれるとともに該書込位置をポイントする情報がExif IFD領域302gに書き込まれると仮定して説明を続ける。もちろん、これらの情報をメーカーに依存する領域に書き込むように構成してもよい。このように、顔位置(顔座標)の情報である顔情報はExif情報に記載され、画像データに添付されている。したがって、Exif情報に顔情報が含まれる場合には、顔個数Ncやシーン情報などとともに画像データの補正に利用される。一方、Exif情報に顔情報が含まれていない場合、顔情報がないと判断される。
In addition, in the 0th IFD (IFD of main image)
次に、上記のようなデータ構造(図2)を有する画像ファイルがメモリカードMに保存されており、そのメモリカードMから画像ファイルを読み出し、印刷装置100により画像ファイルに含まれる各種情報に基づき所定の画像処理を実行して印刷する動作について、図4ないし7を参照しつつ説明する。
Next, an image file having the above-described data structure (FIG. 2) is stored in the memory card M, and the image file is read from the memory card M, and based on various information included in the image file by the
図5および図6は図1の印刷装置で実行される画像処理および印刷動作を示すフローチャートである。ユーザーが印刷装置100のカードスロット112にメモリカードMを挿入し、操作ボタン109を操作して印刷指令を与えると、CPU101がROM102に格納されているプログラムにしたがって装置各部を制御して以下の画像処理および印刷動作を実行する。
5 and 6 are flowcharts showing image processing and printing operations executed by the printing apparatus of FIG. When the user inserts the memory card M into the
まず、CPU101は、印刷の対象となる画像ファイルをメモリカードMから取得し、ハフマン解凍処理を実行し、量子化DCT(Discrete Cosine Transform)係数を得る(ステップS10)。より具体的には、CPU101は、図2に示す画像ファイルからエントロピー符号化テーブルを取得し、圧縮データ307に含まれているY(輝度)成分、Cr(色差成分)、および、Cb(色差成分)のそれぞれのブロックのDC係数と、AC係数とを復号する。なお、この際、最小符号化単位であるMCU(Minimum Coded Unit)単位で復号を行う。
First, the
また、CPU101は、ステップS10において得られた量子化DCT係数を逆量子化する(ステップS11)。具体的には、CPU101は、図2に示す画像ファイルから量子化テーブルを取得し、ステップS10において得られた量子化DCT係数に乗じることにより(逆量子化することにより)、DCT係数を得る。
Further, the
次に、CPU101は、画像を回転させるために必要な情報を、例えばRAM103にキャッシュする(ステップS12)。具体的には、JPEG方式によって圧縮された画像を回転させる場合、MCUのDC成分(直流成分)とAC成分(交流成分)のそれぞれを一度ハフマン展開しなければならない。ここで、DC成分については隣接するDC成分値の差分をハフマン符号化することから、隣接するMCUとの相関関係が問題となる。また、AC成分ではハフマン符号化処理によりそのデータ長が各MCUで一定にならず、JPEGデータのビットストリーム中のどのデータが求めるMCUのAC成分値であるかが不明となることが問題となる。そこで、ステップS12では、各MCUのDC成分値とAC成分のアドレスを求めてキャッシュしておくことにより、ローテート処理を可能とする。
Next, the
そして、CPU101はステップS11で得られたDCT係数に対して逆DCT演算を施すことによりもとの画素値を得る(ステップS13)。また、CPU101は、ステップS13の処理によって得られたYCC空間の画像をRGB(Red Green Blue)空間の画像と、HSB(Hue Saturation Brightness)空間の画像に変換する(ステップS14)。
Then, the
次に、CPU101はステップS13およびステップS14の処理において得られたYCC,RGB,HSBのそれぞれの画像をRAM103に格納して保持する。なお、このとき、データ量を削減するために画素を所定の割合で間引きした後にRAM103に格納してもよい(ステップS15)。
Next, the
また、CPU101は、ステップS15においてRAM103に格納されたYCC,RGB,HSBそれぞれの画像の成分について、ヒストグラムを計算する(ステップS16)。具体的には、RGB画像については、R,G,Bそれぞれの画像についてヒストグラムを計算する。その結果、画像を構成する各成分の分布を得る。
In addition, the
上記したように、本実施形態では、ステップS10〜16の処理はMCU単位で行われており、CPU101は、全てのMCUについての処理が終了したことを確認するまで、ステップS10に戻って処理を繰り返して実行する。一方、全てのMCUについての処理が終了した場合には、次のステップS17に進む。
As described above, in the present embodiment, the processing in steps S10 to S16 is performed in units of MCUs, and the
このステップS17で、CPU101は、ステップS15でRAM103に格納した画像データを使って顔認識処理を行う。この顔認識方式についても、デジタルカメラ200と同様に従来より提案されている方式を採用することができ、デジタルカメラ200で採用した方式と同一のものを採用してもよいし、異なる方式であってもよい。また、印刷装置100の顔認識処理により検出されたプリンター顔座標についてはRAM103に記憶される。この実施形態では、図7(a)に示すように予め10個のプリンター顔座標を記憶するためのメモリ空間がRAM103に準備されており、このメモリ空間に検出されたプリンター顔座標が登録顔情報No.1、2、…の順序で記憶される。例えば図4(c)に示すように印刷装置(プリンター)100での顔認識処理によって三人の人物について、各人物のプリンター顔座標(LT1p,LB1p,RT1p,RB1p)、(LT2p,LB2p,RT2p,RB2p)、(LT3p,LB3p,RT3p,RB3p)が検出されると、図7(a)に示すようにそれぞれ登録顔情報No.1〜3に登録される。なお、該当するプリンター顔座標がない登録顔情報No.4以降のアドレスにはゼロを登録する。また、CPU101は、検出した顔の個数、つまりプリンター顔個数Npを設定する(上記した具体例では、Np=3と設定する)。
In step S17, the
また、プリンター顔座標の検出・記憶に続いて、CPU101はステップS18およびS19を実行してカメラ顔座標を取得し、RAM103のカメラ顔座標用のメモリ空間に記憶するとともにカメラ顔個数Ncを記憶する。すなわち、CPU101は、図2の画像ファイル中のExifタグから顔個数Ncおよび顔座標を読み込み(ステップS18)、さらにカメラ顔座標についてはQVGA(Quarter Video Graphics Array)サイズに規格化し、それらをRAM103に格納する(ステップS19)。この実施形態では、カメラ顔座標についても、図7(b)に示すように予め10個を記憶するためのメモリ空間がRAM103に準備されており、このメモリ空間にカメラ顔座標が登録顔情報No.1、2、…の順序で記憶される。例えば図4(a)に示すようにデジタルカメラ200での顔認識処理によって二人の人物について、各人物のカメラ顔座標(LT1c,LB1c,RT1c,RB1c)、(LT2c,LB2c,RT2c,RB2c)が検出されて画像データに付加されているときには、印刷装置100において2つのカメラ顔座標は図7(b)に示すようにそれぞれ登録顔情報No.1、2に登録される。なお、該当するカメラ顔座標がない登録顔情報No.3以降のアドレスにはゼロを登録する。また、CPU101は、ステップS18で読み込んだ顔の個数、つまりカメラ顔個数Ncを設定する(上記した具体例では、Nc=2と設定する)。
Further, following the detection and storage of the printer face coordinates, the
こうして、プリンター顔座標とカメラ顔座標とが得られると、CPU101は、印刷装置100で検出されたプリンター顔座標(第1顔情報)の各々がステップS19で取得されたカメラ顔座標(第2顔情報)のいずれかと一致するか否かを判別する(ステップS20〜S25)。すなわちステップS20で、CPU101は、カメラ顔個数Ncがゼロよりも大きいか否かを判別する。ここで、ステップS18で取得したカメラ顔個数Ncが元々ゼロである場合、あるいはステップS21〜S25の処理を全カメラ顔座標について完了した時点でカメラ顔個数Nc=0となるため、これらの場合には、CPU101はステップS20で「NO」と判別し、ステップS26に進む。
When the printer face coordinates and the camera face coordinates are thus obtained, the
一方、ステップS20で「YES」のとき、つまりプリンター顔座標で特定されるプリンター顔領域との重なり判別が実施されていないカメラ顔座標が残っている間、ステップS21〜S25の処理を繰り返して行う。このステップS21で、CPU101は、プリンター顔個数Npがゼロよりも大きいか否かを判別する。そして、ステップS21で「YES」のとき、つまりNc番目のカメラ顔座標で特定されるカメラ顔領域との重なり判別が実施されていないプリンター顔座標が残っているときには、CPU101は、Nc番目のカメラ顔座標で特定されるカメラ顔領域FRcと、各プリンター顔座標で特定されるプリンター顔領域FRpとの重複率を算出する(ステップS22)。例えば図4(b)に示すように、カメラ顔座標(LT2c,LB2c,RT2c,RB2c)で特定されるカメラ顔領域FRcと、プリンター顔座標(LT2p,LB2p,RT2p,RB2p)で特定されるプリンター顔領域FRpとの重なっている重複領域(同図(b)中のハッチング領域)ORの面積を求めるとともに、顔領域FRc(またはFRp)に対する重複領域ORの面積率を上記重複率として求める。
On the other hand, when “YES” is determined in the step S20, that is, while the camera face coordinates that are not determined to overlap with the printer face area specified by the printer face coordinates remain, the processes of the steps S21 to S25 are repeated. . In step S21, the
また、CPU101は、その他のプリンター顔領域FRpについても同様にして求めた後、重複率が40%以上となるプリンター顔領域FRpが存在する、つまりステップS17で検出したプリンター顔のなかにNc番目のカメラ顔と重なる(あるいは一致する)ものがあるか否かを判別する(ステップS23)。このステップS23でNc番目のカメラ顔と重なるプリンター顔、つまり重複顔領域が見つかった場合のみ、CPU101は、当該プリンター顔(重複顔領域)を特定するプリンター顔座標をRAM103から削除するとともに、プリンター顔個数Npを「1」だけデクリメントし(ステップS24)、ステップS25に進む。なお、Nc番目のカメラ顔と重なるプリンター顔がない場合には、ステップS24を実行することなく、ステップS25に進む。
Further, the
このステップS25で、CPU101はNc番目のカメラ顔座標をRAM103の座標リストに登録する。この座標リストは、例えば図7(c)に示すように予め10個の顔座標を記憶するためのRAM103に設定されたメモリ空間であり、上記カメラ顔座標用およびプリンター顔座標用とは別個に設けられたものである。また、CPU101は、Nc番目カメラ顔座標の座標リストへの登録後に、カメラ顔個数Ncを「1」だけデクリメントし、ステップS20に戻る。
In step S <b> 25, the
このようにステップS20〜S25の実行により、ステップS19で取得されたカメラ顔座標の全部は座標リストに登録されるのに対し、ステップS17で検出されたプリンター顔座標のうちカメラ顔と重なるプリンター顔(重複顔領域)を特定するプリンター顔座標についてはRAM103から削除される。例えば図4および図7に示す具体例では、3つのうちプリンター顔座標(LT1p,LB1p,RT1p,RB1p)、(LT2p,LB2p,RT2p,RB2p)が重複顔領域と特定するものであり、RAM103から削除され、カメラ顔と重ならないプリンター顔(非重複顔領域)を特定するプリンター顔座標(LT3p,LB3p,RT3p,RB3p)のみがRAM103に残っている。このようにプリンター顔座標(LT3p,LB3p,RT3p,RB3p)は、ステップS17で検出されたプリンター顔座標で特定されるプリンター顔領域FRpのうちカメラ顔領域FRcと重ならず、しかもRAM103から削除されずに残ったものであり、これにより特定される顔領域FRp′が本発明の「非重複領域」に相当するものであり、以下のおいては「非重複領域」と称する。
As described above, by executing Steps S20 to S25, all the camera face coordinates acquired in Step S19 are registered in the coordinate list, whereas the printer face that overlaps the camera face among the printer face coordinates detected in Step S17. The printer face coordinates that specify (overlapping face area) are deleted from the
次のステップS26で、CPU101は、座標リストに登録されたカメラ顔座標の有無を判別する。そして、例えば図7に示すように座標リストにカメラ顔座標が登録されている場合(ステップS26で「YES」)には、CPU101は以下に説明するステップS27〜S36を実行し、その時点で削除されずに残っているプリンター顔座標(つまり、非重複領域を特定するプリンター顔座標)のうち適正なものを登録済のカメラ顔座標を用いて選択し、座標リストに登録した後、ステップS38に進む。一方、座標リストにカメラ顔座標が登録されていない場合(ステップS26で「NO」)には、CPU101は、その時点で削除されずに残っているプリンター顔座標の全てを座標リストに登録した(ステップS37)後、ステップS38に進む。
In the next step S26, the
ここで、ステップS38以降の処理内容を説明する前に、ステップS27〜S36に戻って処理内容について詳しく説明する。ステップS27で、CPU101は、プリンター顔個数Npがゼロより大きいか否かを判別することで、非重複領域(例えば図4中の顔領域FRp′)の有無を判断する。そして、非重複領域が存在する場合(ステップS27で「YES」)には、CPU101は座標リストに登録されたカメラ顔座標で特定される全カメラ顔領域の平均顔明度Yavrおよび平均顔サイズSavrを画像データに基づいて計算する(ステップS28)。すなわち、カメラ顔領域の各々について、各画素の明度YをRGB値により例えば次式、
Y=0.299*R+0.587*G+0.114*B
で計算し、それらの平均値を各カメラ顔領域の平均顔明度とし、さらにそれらの平均を平均顔明度Yavrとしている。また、平均顔サイズSavrは登録済カメラ顔領域FRcの顔サイズSの平均値である。
Here, before describing the processing contents after step S38, returning to steps S27 to S36, the processing contents will be described in detail. In step S27, the
Y = 0.299 * R + 0.587 * G + 0.114 * B
The average value thereof is used as the average facial brightness of each camera face area, and the average thereof is used as the average facial brightness Yavr. The average face size Savr is an average value of the face size S of the registered camera face area FRc.
また、CPU101は、上記平均顔明度Yavrおよび平均顔サイズSavrから次式にしたがって有効最大顔明度Ymax、有効最小顔明度Ymin、有効最大顔サイズSmax、有効最小顔サイズSminを算出する。
有効最大顔明度Ymax=Yavr+Yavr/2
有効最小顔明度Ymin=Yavr/2
有効最大顔サイズSmax=Savr+Savr/2
有効最小顔サイズSmin=Savr/2
これら有効最大顔明度Ymax、有効最小顔明度Ymin、有効最大顔サイズSmax、有効最小顔サイズSminは、印刷装置100での顔認識処理により認識された非重複領域が適正な顔である否かを判別するための基準値である。このような基準値を設定した理由は、画像データに例えば過剰に小さい顔(例えば、人形の顔)や、過剰に大きい顔(例えば、ポスターに写る顔)が含まれている場合や、過剰に暗い顔や過剰に明るい顔が含まれている場合に、印刷装置100での顔認識処理によりそれらを非重複領域として認識してしまう可能性があり、このような認定結果に基づくプリンター顔座標を排除するためである。
Further, the
Effective maximum facial brightness Ymax = Yavr + Yavr / 2
Effective minimum facial brightness Ymin = Yavr / 2
Effective maximum face size Smax = Savr + Savr / 2
Effective minimum face size Smin = Savr / 2
These effective maximum face brightness Ymax, effective minimum face brightness Ymin, effective maximum face size Smax, and effective minimum face size Smin indicate whether or not the non-overlapping area recognized by the face recognition process in the
なお、本実施形態では、平均顔明度Yavrを含む適正顔明度範囲および平均顔サイズSavrを含む適正顔サイズ範囲をそれぞれ上記したように設定しているが、各範囲はこれに限定されるものではなく、実験結果や撮影条件などを考慮して有効最大顔明度Ymax、有効最小顔明度Ymin、有効最大顔サイズSmax、有効最小顔サイズSminをそれぞれ設定することができる。 In this embodiment, the appropriate face brightness range including the average face brightness Yavr and the appropriate face size range including the average face size Savr are set as described above, but each range is not limited to this. Instead, the effective maximum face brightness Ymax, the effective minimum face brightness Ymin, the effective maximum face size Smax, and the effective minimum face size Smin can be set in consideration of the experimental results and the photographing conditions.
そして、CPU101は、ステップS30〜S36を実行し、非重複領域の各々が適正な顔領域である場合にのみ、当該非重複領域を特定するプリンター顔座標を座標リストに登録する。すなわち、プリンター顔個数Npがゼロより大きいと判別する(ステップS30で「YES」)と、CPU101は、Np番目のプリンター顔座標で特定されるプリンター顔領域の平均顔明度Ypを計算し(ステップS31)、その計算結果が有効最大顔明度Ymaxと有効最小顔明度Yminとの間、つまり適正顔明度範囲内にあるか否かを判別する(ステップS32)。これによりカメラ顔領域から大きく離れた明度を有する非重複領域を排除することができる。
Then, the
また、ステップS32で「YES」と判別した場合、CPU101は、Np番目のプリンター顔座標で特定されるプリンター顔領域の顔サイズSpを計算し(ステップS33)、その計算結果が有効最大顔サイズSmaxと有効最小顔サイズSminとの間、つまり適正顔サイズ範囲内にあるか否かを判別する(ステップS34)。これによりカメラ顔領域から大きく離れた顔サイズを有する非重複領域を排除することができる。
If “YES” is determined in the step S32, the
そして、CPU101は、上記のようにしてNp番目のプリンター顔領域が適正な非重複領域であると判別するとき、当該プリンター顔領域を特定する顔座標を座標リストに登録した後、プリンター顔個数Npを「1」だけデクリメントし(ステップS35)、ステップS30に戻る。一方、Np番目のプリンター顔領域の明度Ypが適正顔明度範囲(Ymax〜Ymin)から外れたり(ステップS32で「NO」)、顔サイズSpが適正顔サイズ範囲(Smax〜Smin)から外れる(ステップS34で「NO」)場合、CPU101は当該非重複領域が不適正なものであると判別し、当該プリンター顔領域を特定する顔座標を座標リストに登録することなく、実質上削除する。さらに、CPU101は、プリンター顔個数Npを「1」だけデクリメント(ステップS36)し、ステップS30に戻る。
When the
そして、プリンター顔個数Npがゼロとなるまで、CPU101は、上記ステップS31〜S36を繰り返することによって非重複領域の全てについて適正か不適正かの判別および座標リストへの登録を実行し、ステップS38に進む。
Then, until the number of printer faces Np becomes zero, the
次にステップS38以降の処理内容について説明する。このステップS38で、CPU101は座標リストにカメラ顔座標および/またはプリンター顔座標が登録されている否かを判別する。そして、カメラ顔座標かプリンター顔座標かを問わず、顔座標が登録されている場合(ステップS38で「YES」)には、CPU101は、座標リストに登録された顔座標に基づいて全ての顔位置を計算し、さらに顔の平均顔色を取得した(ステップS39)後、顔色が最適になるようにエンハンスパラメータを計算する(ステップS40)。なお、エンハンスパラメータ計算の詳細については省略するが、RAM103に記憶したRGBヒストグラムに基づきコントラスト、明度、彩度、シャープネスなどの各画質パラメータの特徴量を抽出し、抽出した特徴量が所定の画質パラメータの特徴量に近づくようエンハンスのパラメータを設定する。このように、座標リストに登録された顔座標に基づいて画像データの補正パラメータが設定されており、これらの顔座標が本発明の「補正基礎情報」に相当する。
Next, processing contents after step S38 will be described. In step S38, the
一方、座標リストにカメラ顔座標もプリンター顔座標も登録されていない場合(ステップS38で「NO」)、CPU101は、画像全体が最適になるようにエンハンスパラメータを計算する(ステップS41)。
On the other hand, when neither camera face coordinates nor printer face coordinates are registered in the coordinate list (“NO” in step S38), the
このようにエンハンスパラメータが設定された後、CPU101は、印刷対象となる画像ファイルにおいて、解凍処理の対象となる位置を示すファイルポインタをリセットし、処理位置を画像ファイルの先頭に復元する(ステップS42)。そして、CPU101は、以下のステップS43〜S50を繰り返して画像データに基づいて画像を印刷する。
After the enhancement parameters are set in this way, the
CPU101は、RAM103にキャッシュされた1MCUライン分の画像データにハフマン解凍処理を施し、量子化DCT係数を得る(ステップS43)。ここで、1MCUラインとは、画像を回転させる場合には、画像を構成する列方向に1列のMCU群をいい、回転させない場合には、画像を構成する行方向に1列のMCU群をいう。そして、CPU101は、ステップS29の処理において得られた量子化DCT係数を逆量子化し(ステップS44)、さらにステップS43で得られたDCT係数に対して逆DCT演算を施すことによりもとのデータを得る(ステップS45)。
The
こうして得られたYCC空間の画像を、CPU101はRGB空間の画像に変換する(ステップS46)。そして、CPU101は、エンハンスの実行が設定されている場合のみ、つまりステップS52で「YES」と判別した場合のみ、RGB空間の画像を構成する各画素に対してステップS40、S41において算出したエンハンスパラメータを適用することにより、印刷される画像を最適な色合いに補正し(ステップS47)、次のステップS48に進む。
The
CPU101は、こうして補正された画像データに対して、リサイズ、回転などのレイアウト処理を施し(ステップS48)、プリンターエンジンコントローラー111の図示せぬバンドバッファに供給する。これを受けたプリンターエンジンコントローラー111は、プリンターエンジン113の各部を制御して画像データに対応する画像を印刷する(ステップS49)。そして、印刷処理が完了すると、CPU101はRAM103のキャッシュ状態を更新する(ステップS50)。そして、全MCUライン分について上記ステップS43〜S50が完了すると、一連の処理を終了する。
The
以上のように、第1実施形態によれば、プリンター顔領域FRpがカメラ顔領域FRcと重なる場合には、そのカメラ顔領域FRcを特定するカメラ顔座標を補正基礎情報として座標リストに登録する一方、そのプリンター顔領域FRpを特定するプリンター顔座標を実質的に削除して補正基礎情報に含めていない。このように、当該カメラ顔座標を使用して画像データを補正しているので、印刷装置100側での誤検出などの影響を受けることなく、画像データを適正に補正することができる。また、プリンター顔領域FRpにカメラ顔領域FRcと重ならない非重複領域(例えば図4中のプリンター顔領域FRp′)が含まれるときには、非重複領域を特定するプリンター顔座標を補正基礎情報に含めてもよく、これによりデジタルカメラ200における顔認識時点では認識されていなかった人物の顔も考慮して画像データを補正することができる。
As described above, according to the first embodiment, when the printer face area FRp overlaps the camera face area FRc, the camera face coordinates specifying the camera face area FRc are registered in the coordinate list as correction basic information. The printer face coordinates that specify the printer face area FRp are substantially deleted and are not included in the correction basic information. In this way, since the image data is corrected using the camera face coordinates, the image data can be corrected appropriately without being affected by erroneous detection on the
また、第1実施形態では、非重複領域が検出されるものの、その非重複領域の顔明度が適正顔明度範囲から外れる場合や非重複領域の顔サイズが適正顔サイズ範囲を外れるには、そのような不適正な非重複領域を特定するプリンター顔座標を補正基礎情報に含めていない。このため、画像データをより適正に補正することができる。 In the first embodiment, a non-overlapping area is detected, but the face brightness of the non-overlapping area is out of the appropriate face brightness range or the face size of the non-overlapping area is out of the appropriate face size range. Printer face coordinates that specify such inappropriate non-overlapping areas are not included in the basic correction information. For this reason, image data can be corrected more appropriately.
このように、第1実施形態では、エンハンス処理が本発明の「画像データの補正」に相当し、プリンター顔領域FRpおよびプリンター顔座標(LT1p,LB1p,RT1p,RB1p)等がそれぞれ本発明の「第1顔領域」および「第1顔情報」に相当し、カメラ顔領域FRcおよびカメラ顔座標(LT1c,LB1c,RT1c,RB1c)等がそれぞれ本発明の「第2顔領域」および「第2顔情報」に相当している。 As described above, in the first embodiment, the enhancement processing corresponds to “image data correction” according to the present invention, and the printer face area FRp, the printer face coordinates (LT1p, LB1p, RT1p, RB1p), etc. It corresponds to “first face area” and “first face information”, and the camera face area FRc, camera face coordinates (LT1c, LB1c, RT1c, RB1c) and the like are “second face area” and “second face” of the present invention, respectively. Corresponds to "information".
ところで、上記第1実施形態では、同一人物の顔に対してカメラ顔座標とプリンター顔座標とが検出された場合、常にカメラ顔座標を補正基礎情報としているが、次のような問題が発生することがある。例えばデジタルカメラ200で人物を撮像する際、ピント合わせを行った後で人物が動いてしまうと、カメラ顔座標よりもプリンター顔座標の方が人物位置をより正確に表しているため、これを補正基礎情報として用いるのが好ましい。以下、図8を参照しつつ、顔領域の色相が肌色か否かに基づいて補正基礎情報を設定する実施形態について説明する。
By the way, in the first embodiment, when camera face coordinates and printer face coordinates are detected for the face of the same person, the camera face coordinates are always used as basic correction information. However, the following problems occur. Sometimes. For example, if a person moves after focusing with the
図8は、本発明にかかる画像処理装置の第2実施形態の動作を示すフローチャートである。この第2実施形態が第1実施形態と大きく相違する点は、カメラ顔領域とプリンター顔領域とが重なる場合に、プリンター顔およびカメラ顔の色相を考慮していずれの顔座標を補正基礎情報として座標リストに登録するかを決定している点であり、その他の構成は基本的に同一である。したがって、以下においては、相違点を中心に説明し、同一構成については同一符号を付して説明を省略する。 FIG. 8 is a flowchart showing the operation of the second embodiment of the image processing apparatus according to the present invention. The second embodiment differs greatly from the first embodiment in that when the camera face area and the printer face area overlap, any face coordinates are used as correction basic information in consideration of the hue of the printer face and the camera face. Whether to register in the coordinate list is determined, and other configurations are basically the same. Therefore, in the following, differences will be mainly described, and the same components will be denoted by the same reference numerals and description thereof will be omitted.
この第2実施形態では、第1実施形態と同様にして、CPU101は、ステップS15でRAM103に格納した画像データを使って顔認識処理を行ってプリンター顔座標を求めるとともに、顔個数Ncおよび顔座標を取得する。そして、CPU101は、ステップS17で検出したプリンター顔のなかにNc番目のカメラ顔と重なる(あるいは一致する)ものがあるか否かを判別する(ステップS23)。そして、このステップS23でNc番目のカメラ顔と重なるプリンター顔が見つかった場合、第1実施形態では当該プリンター顔を特定するプリンター顔座標をRAM103から削除する(ステップS24)のに対し、第2実施形態では次に説明するように第1実施形態と異なる処理を実行している(ステップS24a〜S24f)。
In the second embodiment, as in the first embodiment, the
この第2実施形態では、CPU101はNc番目のカメラ顔と重なるプリンター顔の色相を計算し(ステップS24a)、その計算結果からプリンター顔が肌色ではないか否かを判別する(ステップS24b)。ここで、肌色を判別する際、RGBでの認識よりも直感的に色域の指定がしやすいHSB色空間で判別するのが望ましく、本実施形態ではこれにより肌色か否かを判別している。この点に関しては、カメラ顔が肌色か否かを判別する際も同様である。
In the second embodiment, the
そして、CPU101は、プリンター顔が肌色ではないと判別した場合(ステップS24bで「YES」)には、第1実施形態と同様に、当該プリンター顔を特定するプリンター顔座標をRAM103から削除するとともに、プリンター顔個数Npを「1」だけデクリメントした(ステップS24c)後にステップS24dに進む。一方、プリンター顔が肌色であると判別した場合(ステップS24bで「NO」)には、そのままステップS24dに進む。このように、カメラ顔と重なっているにもかかわらず当該プリンター顔を残しておくことで、当該プリンター顔を特定するプリンター顔座標が補正基礎情報として座標リストに登録される可能性が残される。つまり、当該プリンター顔の平均顔明度が適正顔明度範囲内であり、しかも顔サイズが適正顔サイズ範囲内である場合には、当該プリンター顔を特定するプリンター顔座標が補正基礎情報として座標リストに登録される。
If the
次のステップS24dでは、CPU101は、Nc番目のカメラ顔の色相を計算する。そして、その計算結果からカメラ顔が肌色ではないか否かをCPU101は判別する(ステップS24e)。そして、CPU101は、カメラ顔が肌色であると判別した場合(ステップS24eで「NO」)には、第1実施形態と同様に、Nc番目のカメラ顔座標をRAM103の座標リストに登録し、さらにカメラ顔個数Ncを「1」だけデクリメントし(ステップS25)、ステップS20に戻る。一方、カメラ顔が肌色ではないと判別した場合(ステップS24eで「YES」)には、CPU101は座標リストへの登録を行うことなく、Nc番目のカメラ顔座標を実質的に削除するとともに、カメラ顔個数Ncを「1」だけデクリメントし(ステップS24f)、ステップS20に戻る。
In the next step S24d, the
以上のように、第2実施形態によれば、カメラ顔およびプリンター顔の各々について顔色が肌色か否かを判別し、顔色が肌色でないと判別したときには、その顔を特定する顔座標は補正基礎情報として座標リストに登録されず、画像データの補正に用いられない。したがって、画像データをより適正に補正することができる。 As described above, according to the second embodiment, for each of the camera face and the printer face, it is determined whether or not the face color is a skin color, and when it is determined that the face color is not a skin color, the face coordinates that specify the face are the correction basis. It is not registered in the coordinate list as information and is not used for correcting image data. Therefore, the image data can be corrected more appropriately.
なお、本発明は上記した実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて上述したもの以外に種々の変更を行うことが可能である。例えば、上記実施形態では、画像データに顔座標などを付加した画像ファイルをメモリカードMに記録し、当該メモリカードMを介して印刷装置100に供給して印刷しているが、有線または無線通信により画像ファイルが印刷装置100に供給される場合も、本発明を適用することで上記した実施形態と同様の作用効果が得られる。
The present invention is not limited to the above-described embodiment, and various modifications other than those described above can be made without departing from the spirit of the present invention. For example, in the above-described embodiment, an image file in which face coordinates and the like are added to image data is recorded on the memory card M, supplied to the
また、上記実施形態では、顔領域を4点の座標で示しているが、顔領域の表現方式はこれに限定されるものではなく、例えば中心座標に大きさを組み合わせたもの、中心座標に幅および高さを組み合わせたもの等を用いることができ、これらの表現方式でカメラ顔領域やプリンター顔領域を特定した顔座標も本発明の「顔情報」に含まれる。 Further, in the above embodiment, the face area is indicated by the coordinates of the four points, but the expression method of the face area is not limited to this, for example, the combination of the size to the center coordinate, the width to the center coordinate A combination of height and the like can be used, and the face coordinates specifying the camera face area and the printer face area by these expression methods are also included in the “face information” of the present invention.
また、上記実施形態では、本発明にかかる画像処理装置および方法を印刷装置100に適用しているが、複数の電子機器から構成される印刷システムにも、また印刷装置以外の1つの電子機器(例えば複合機、ファクシミリ装置など)にも適用可能である。
In the above-described embodiment, the image processing apparatus and method according to the present invention are applied to the
また、上記実施形態にかかる画像処理方法を実行するプログラムを、CD−ROM、光ディスク、光磁気ディスク、不揮発性メモリカードなどの記憶媒体に記憶させ、この記憶媒体からプログラムをコードとして読み出し、コンピューターにおいて実行してもよい。つまり、上記プログラムを記憶した記憶媒体、コンピュータープログラム自体も本発明の一実施形態に含まれる。 A program for executing the image processing method according to the above embodiment is stored in a storage medium such as a CD-ROM, an optical disk, a magneto-optical disk, and a nonvolatile memory card, and the program is read from the storage medium as a code. May be executed. That is, the storage medium storing the above program and the computer program itself are also included in one embodiment of the present invention.
100…印刷装置、 101…CPU(顔情報検出部、顔情報取得部、情報選択部、補正部)、 102…ROM、 103…RAM、 104…EEPROM、 200…デジタルカメラ、 307…圧縮データ(画像データ)、 FRc…(第2)顔領域、 FRp…(第1)顔領域、FRp′…非重複領域
DESCRIPTION OF
Claims (8)
前記画像データに付加される第2顔情報を取得する顔情報取得部と、
顔情報を含む補正基礎情報に基づいて前記画像データを補正する補正部と、
前記第1顔情報で特定される第1顔領域が前記第2顔情報で特定される第2顔領域と重なるときには、前記第1顔領域と重なる前記第2顔領域を特定する第2顔情報を前記補正基礎情報に含める情報選択部と
を備えることを特徴とする画像処理装置。 A face information detection unit that executes face recognition processing for recognizing a person's face from image data and detects first face information;
A face information acquisition unit that acquires second face information added to the image data;
A correction unit that corrects the image data based on correction basic information including face information;
When the first face area specified by the first face information overlaps with the second face area specified by the second face information, second face information for specifying the second face area overlapping the first face area And an information selection unit including the correction basic information in the correction basic information.
前記画像データに付加される第2顔情報を取得する第2工程と、
前記第1顔情報で特定される第1顔領域が前記第2顔情報で特定される第2顔領域と重なるときには前記第1顔領域が前記第2顔領域に重なる第2顔情報に基づいて前記画像データを補正する第3工程と
を備えることを特徴とする画像処理方法。 A first step of detecting face information by performing face recognition processing for recognizing a person's face from image data;
A second step of acquiring second face information added to the image data;
When the first face area specified by the first face information overlaps the second face area specified by the second face information, the first face area is based on the second face information overlapping the second face area. And a third step of correcting the image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010258644A JP5830851B2 (en) | 2010-11-19 | 2010-11-19 | Image processing apparatus, image processing program, and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010258644A JP5830851B2 (en) | 2010-11-19 | 2010-11-19 | Image processing apparatus, image processing program, and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012109896A true JP2012109896A (en) | 2012-06-07 |
JP5830851B2 JP5830851B2 (en) | 2015-12-09 |
Family
ID=46495015
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010258644A Active JP5830851B2 (en) | 2010-11-19 | 2010-11-19 | Image processing apparatus, image processing program, and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5830851B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021218325A1 (en) * | 2020-04-27 | 2021-11-04 | 北京字节跳动网络技术有限公司 | Video processing method and apparatus, and computer-readable medium and electronic device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008250444A (en) * | 2007-03-29 | 2008-10-16 | Omron Corp | Face detection device, face detection method, and face detection program |
JP2009094946A (en) * | 2007-10-11 | 2009-04-30 | Fujifilm Corp | Image pickup device and portrait right protection method in the same device |
JP2009110486A (en) * | 2007-11-01 | 2009-05-21 | Sony Corp | Unit, method and program for image processing, imaging unit, and control method for imaging unit |
JP2010009228A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processor, image processing method, computer program, and storage medium |
JP2010010947A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processing apparatus, image processing method, program, and recording medium |
JP2010010938A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processing apparatus, image processing method, program and computer-readable recording medium |
JP2010160640A (en) * | 2009-01-07 | 2010-07-22 | Seiko Epson Corp | Image processor, printer, image processing method and image processing program |
-
2010
- 2010-11-19 JP JP2010258644A patent/JP5830851B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008250444A (en) * | 2007-03-29 | 2008-10-16 | Omron Corp | Face detection device, face detection method, and face detection program |
JP2009094946A (en) * | 2007-10-11 | 2009-04-30 | Fujifilm Corp | Image pickup device and portrait right protection method in the same device |
JP2009110486A (en) * | 2007-11-01 | 2009-05-21 | Sony Corp | Unit, method and program for image processing, imaging unit, and control method for imaging unit |
JP2010009228A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processor, image processing method, computer program, and storage medium |
JP2010010947A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processing apparatus, image processing method, program, and recording medium |
JP2010010938A (en) * | 2008-06-25 | 2010-01-14 | Canon Inc | Image processing apparatus, image processing method, program and computer-readable recording medium |
JP2010160640A (en) * | 2009-01-07 | 2010-07-22 | Seiko Epson Corp | Image processor, printer, image processing method and image processing program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021218325A1 (en) * | 2020-04-27 | 2021-11-04 | 北京字节跳动网络技术有限公司 | Video processing method and apparatus, and computer-readable medium and electronic device |
US11800043B2 (en) | 2020-04-27 | 2023-10-24 | Beijing Bytedance Network Technology Co., Ltd. | Video processing method and apparatus, and computer-readable medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
JP5830851B2 (en) | 2015-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4487775B2 (en) | Panorama composition processing of multiple image data | |
JP5886265B2 (en) | Portable terminal device, program, and recording medium | |
JP5127592B2 (en) | Image processing apparatus, image processing method, program, and computer-readable recording medium | |
JP2000209425A (en) | Device and method for processing image and storage medium | |
JP2000350077A (en) | Digital camera and method for photographing and transferring document | |
JP2002199410A (en) | Imaging device, compensating processing method for deteriorated image and storage medium | |
JP2010021921A (en) | Electronic camera and image processing program | |
JP2004096506A (en) | Image forming method, image processor and image recording device | |
JP5609555B2 (en) | Image processing apparatus, program, and image processing method | |
JP2005260657A (en) | Photographing apparatus, image processing method and program therefor | |
JP2014123881A (en) | Information processing device, information processing method, and computer program | |
JP2012175500A (en) | Image processing method, control program, and image processing device | |
JP5830851B2 (en) | Image processing apparatus, image processing program, and image processing method | |
JP2008061209A (en) | Image processing method | |
US8630503B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP5644578B2 (en) | Image processing apparatus, image processing method, and computer program for image processing | |
JP2006279460A (en) | Image processor, printer, image processing method, and image processing program | |
US7609425B2 (en) | Image data processing apparatus, method, storage medium and program | |
JP5500048B2 (en) | Image processing method and image processing apparatus | |
JP2000216985A (en) | Digital watermark embedding device and method and recording medium for storing digital watermark embedding program and digital camera and method for controlling the same | |
JP5625832B2 (en) | Image processing apparatus and image processing method | |
JP5195317B2 (en) | Camera device, photographing method, and photographing control program | |
JP2012146164A (en) | Image processing method, control program and image processing system | |
JP2012099897A (en) | Image processing method and image processing device | |
JP2004222078A (en) | Image processor, image processing method, and program thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130722 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140327 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140430 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140626 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20150106 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150203 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150325 |
|
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: 20150929 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151012 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5830851 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |