JP2007334675A - Device, method and program for processing image, and recording medium - Google Patents

Device, method and program for processing image, and recording medium Download PDF

Info

Publication number
JP2007334675A
JP2007334675A JP2006166453A JP2006166453A JP2007334675A JP 2007334675 A JP2007334675 A JP 2007334675A JP 2006166453 A JP2006166453 A JP 2006166453A JP 2006166453 A JP2006166453 A JP 2006166453A JP 2007334675 A JP2007334675 A JP 2007334675A
Authority
JP
Japan
Prior art keywords
feature region
chromaticity
detection
candidate
image
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.)
Pending
Application number
JP2006166453A
Other languages
Japanese (ja)
Inventor
Shigeru Mizoguchi
茂 溝口
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2006166453A priority Critical patent/JP2007334675A/en
Publication of JP2007334675A publication Critical patent/JP2007334675A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that an area to be extracted cannot be completely detected by the detection using one representative chromaticity. <P>SOLUTION: An image processor for detecting a specific characteristic area from the image data comprises a first detection means for detecting a candidate of the characteristic area based on the preset chromaticity range, a re-setting means for re-setting the chromaticity range based on chromaticity information of the candidate of the characteristic area detected by the first detection means, a second detection means for further detecting a candidate of the characteristic area based on the chromaticity range reset by the re-setting means, and a characteristic area determination means for determining whether the candidate of the characteristic area detected by the first or second detection means is the specific characteristic area. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像処理方法及び装置に関し、特には、色度に基づく、画像データ中における特徴領域の認識方法及びその応用方法ならびにその装置に関する。   The present invention relates to an image processing method and apparatus, and more particularly to a method of recognizing a feature region in image data based on chromaticity, an application method thereof, and an apparatus thereof.

近年、画像の入力機器としてデジタルカメラなどの入力機器が普及してきている。こうした入力機器で撮影した画像には、色被りや、露出の不適切、コントラストの不適切などによる、撮影バランスが必ずしも良好とはいえない撮影画像が存在し得る。したがって、撮影画像を表示もしくは印刷して鑑賞する場合には、撮影した画像データをそのまま用いることが適切でない場合がある。   In recent years, input devices such as digital cameras have become widespread as image input devices. An image captured by such an input device may include a captured image that does not necessarily have a good balance due to color covering, inappropriate exposure, inappropriate contrast, and the like. Therefore, when viewing a photographed image or printing it for viewing, it may not be appropriate to use the photographed image data as it is.

そこで、良い画像の定義を行い、その定義に沿ったホワイトバランス補正や露出/コントラスト補正を自動で行うことができるアプリケーションも一般的になってきている。しかし、このような環境下でも必ずしも適正な補正ができない撮影画像が存在し得る。   Therefore, an application that can define a good image and automatically perform white balance correction and exposure / contrast correction in accordance with the definition has become common. However, there may be a captured image that cannot always be corrected appropriately even under such an environment.

画像には、画像全体の撮影バランスとは別に、画像の中に観察者にとって興味のある重要な領域が存在する場合があり、その領域の状態が良く絵作りされていないと不満の残る画像となってしまう。このような画像については、上記のような方法では適正な補正を行えない。なお、重要な領域としては、たとえば、人の顔や肌などが挙げられる。こうした重要な領域を考慮に入れた画像補正を行うために、下記のような方法が提案されている。   In some cases, there are important areas of interest to the viewer in the image, apart from the balance of the entire image, and the image remains unsatisfied if the area is not well-drawn. turn into. Such an image cannot be properly corrected by the above method. In addition, as an important area | region, a human face, skin, etc. are mentioned, for example. In order to perform image correction in consideration of such an important area, the following method has been proposed.

特許文献1に開示された技術では、Jpeg画像データにおいて、そのデータ圧縮単位のDCT特性、色度などに基づき、画像中における検出対象領域の判定および検出を行っている。判定単位である圧縮単位の8*8画素のデータに対して、色度の判定としては特定の画素の色度を代表値として判定を行い、この代表値を8*8画素全体の色度としている。そして、この判定を画像全体に占める8*8画素のグループに対して行っている。   In the technique disclosed in Patent Document 1, in Jpeg image data, a detection target region in an image is determined and detected based on DCT characteristics, chromaticity, and the like of the data compression unit. For the 8 * 8 pixel data of the compression unit, which is the determination unit, the chromaticity is determined using the chromaticity of a specific pixel as a representative value, and this representative value is used as the chromaticity of the entire 8 * 8 pixel. Yes. This determination is made for a group of 8 * 8 pixels in the entire image.

特許文献2に開示された技術では、映像信号の色差信号から、1フレーム中の肌色部分の面積を検出して、その領域を人物肌領域とし、輝度補正の目標設定値として利用し、ガンマ補正回路制御信号を作成している。色度の判定は、ビデオ信号の色度信号が、設定した色度の範囲に入っている領域を検出することで行っている。したがって、色度判定の単位としては、画素毎ということになる。   In the technique disclosed in Patent Document 2, the area of a skin color portion in one frame is detected from a color difference signal of a video signal, the area is set as a human skin area, and used as a target setting value for luminance correction, and gamma correction is performed. A circuit control signal is created. The determination of chromaticity is performed by detecting an area where the chromaticity signal of the video signal falls within the set chromaticity range. Therefore, the unit of chromaticity determination is for each pixel.

特開2004−38480号公報JP 2004-38480 A 特許第3203946号公報Japanese Patent No. 3203946

上述したように、デジタルカメラなどの入力機器で撮影した画像(Jpeg画像など)をプリントする場合に、銀塩写真のプリントのように、人物などの注目画像が、より良くプリントできるように必要に応じて補正を行えることが望ましい。これを実現するには、撮影画像の中から注目画像を見つけ出す方法が必要である。一方で、デジタルカメラからプリンタへ直接プリントを行うダイレクトプリントなどデータ処理能力の低い機器でも使用できるように、検出処理はできるだけ軽い処理で済む方法が求められる。   As described above, when printing an image (such as a Jpeg image) taken with an input device such as a digital camera, it is necessary to be able to print a noticed image of a person or the like better like a silver halide photograph print. It is desirable that correction can be performed accordingly. In order to realize this, a method for finding a noticed image from a photographed image is required. On the other hand, there is a need for a method in which the detection process can be performed as lightly as possible so that it can be used even in a device having a low data processing capability such as direct printing that directly prints from a digital camera to a printer.

撮影データの中に人物などの注目画像の有無を検出し、さらに人物の肌領域の検出を行う従来の方法では、領域検出プロセスの中に、色度などの色成分による判定を加えている場合がある。この色度判定を行う場合、検出の基準として定義した色度は通常人肌の色度分布により定義されたものとなっている。   In the conventional method of detecting the presence or absence of an image of interest such as a person in the shooting data, and further detecting the skin area of the person, a determination based on color components such as chromaticity is added to the area detection process. There is. When this chromaticity determination is performed, the chromaticity defined as the detection reference is normally defined by the chromaticity distribution of human skin.

しかし、検出対象の撮影データにおける被写体そのものの色度には差が有り、さらに、この色度は、撮影時の光源状態により影響を受けることがわかっている。この場合、画一の色度代表による検出処理を行うと、色度判定結果からは、抽出対象領域が完全には検出できない場合がある問題があった。本発明は、上記問題点を解決することを目的とする。   However, it is known that there is a difference in the chromaticity of the subject itself in the shooting data to be detected, and that this chromaticity is affected by the light source state at the time of shooting. In this case, when the detection process by the chromaticity representative of the uniform is performed, there is a problem that the extraction target region may not be completely detected from the chromaticity determination result. The present invention aims to solve the above problems.

上記目的を達成するため、第1の発明の画像処理装置は、画像データから特定の特徴領域を検出する画像処理装置において、予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出手段と、前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定手段と、前記再設定手段により再設定された色度範囲に基づいて前記特徴領域の候補をさらに検出する第2の検出手段と、前記第1の検出手段または第2の検出手段で検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定手段とを備えることを特徴とする。   In order to achieve the above object, an image processing apparatus according to a first aspect of the present invention detects a feature region candidate based on a preset chromaticity range in an image processing device that detects a specific feature region from image data. A first detecting unit; a resetting unit that resets the chromaticity range based on chromaticity information of candidate feature regions detected by the first detecting unit; and a color reset by the resetting unit Second detection means for further detecting the feature area candidates based on the degree range, and whether the feature area candidates detected by the first detection means or the second detection means are the specific feature areas And a characteristic region determining means for determining.

また、第2の発明の画像処理装置は、画像データから特定の特徴領域を検出する画像処理装置において、予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出手段と、前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲の再設定の要否を判断する再設定判定手段と、前記再設定判定手段により前記色度範囲の再設定を要すと判定された場合に、前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定手段と、前記再設定手段により再設定された色度範囲に基づいて特徴領域の候補をさらに検出する第2の検出手段と、前記第1および第2の検出手段で検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定手段とを備えることを特徴とする。   According to a second aspect of the present invention, there is provided an image processing apparatus for detecting a feature region candidate based on a preset chromaticity range in an image processing device for detecting a specific feature region from image data. A reset determination unit that determines whether or not the chromaticity range needs to be reset based on chromaticity information of the feature region candidates detected by the first detection unit; and the chromaticity by the reset determination unit A resetting unit for resetting the chromaticity range based on chromaticity information of a candidate feature region detected by the first detection unit when it is determined that the range needs to be reset; Second detection means for further detecting feature area candidates based on the chromaticity range reset by the means, and the feature area candidates detected by the first and second detection means include the specific feature area Feature region determination to determine whether Characterized in that it comprises a stage.

また、第3の発明は、第1または第2の発明の画像処理装置において、前記第1および第2の検出手段における検出処理は、前記画像データに対し特定サイズのブロック単位で行うことを特徴とする。   According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the detection processing in the first and second detection means is performed on the image data in units of a block having a specific size. And

また、第4の発明は、第3の発明の画像処理装置において、前記特徴領域の候補は、候補として検出された連続するブロック群からなることを特徴とする。   According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect of the present invention, the feature area candidates include a group of consecutive blocks detected as candidates.

また、第5の発明は、第1から第4の発明の画像処理装置において、前記再設定手段が、特徴領域の候補毎に前記色度範囲を再設定することを特徴とする。   According to a fifth aspect, in the image processing apparatuses according to the first to fourth aspects, the resetting unit resets the chromaticity range for each feature region candidate.

また、第6の発明は、第1から第5の発明の画像処理装置において、前記特徴領域判定手段は、前記特徴領域の候補がもつ空間周波数特性に基づいて前記判断を行うことを特徴とする。   According to a sixth aspect of the present invention, in the image processing device according to the first to fifth aspects, the feature region determination means makes the determination based on a spatial frequency characteristic of the feature region candidate. .

また、第7の発明は、第1から第6の発明の画像処理装置において、前記特徴領域は、少なくとも人物の肌領域を含むことを特徴とする。   According to a seventh aspect, in the image processing apparatuses according to the first to sixth aspects, the characteristic area includes at least a human skin area.

また、第8の発明は、第1から第7の発明の画像処理装置において、画像補正手段および補正情報作成手段をさらに備え、前記補正情報作成手段は、前記特徴領域用の補正情報を作成し、前記画像補正手段は、前記特徴領域については作成された補正情報を用いて画像補正処理を行い、その他の領域については予め全領域共通に定義された画像補正処理を行うことを特徴とする。   The eighth invention is the image processing device according to any one of the first to seventh inventions, further comprising an image correcting means and a correction information creating means, wherein the correction information creating means creates correction information for the feature region. The image correction means performs image correction processing using the generated correction information for the feature region, and performs image correction processing defined in advance for all the regions for the other regions.

また、第9の発明は、画像データから特定の特徴領域を検出する画像処理方法において、予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出ステップと、前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定ステップと、前記再設定ステップにおいて再設定された色度範囲に基づいて前記特徴領域の候補をさらに検出する第2の検出ステップと、前記第1の検出ステップまたは第2の検出ステップで検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定ステップとを含むことを特徴とする。   According to a ninth aspect of the present invention, in the image processing method for detecting a specific feature region from image data, a first detection step of detecting the feature region candidate based on a preset chromaticity range; A resetting step for resetting the chromaticity range based on chromaticity information of candidate feature regions detected in one detection step; and a feature region based on the chromaticity range reset in the resetting step. A second detection step of further detecting a candidate; and a feature region determination step of determining whether the feature region candidate detected in the first detection step or the second detection step is the specific feature region. It is characterized by that.

また、第10の発明は、画像データから特定の特徴領域を検出する画像処理方法において、予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出ステップと、前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲の再設定の要否を判断する再設定判定ステップと、前記再設定判定ステップにおいて前記色度範囲の再設定を要すと判定された場合に、前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定ステップと、前記再設定ステップにおいて再設定された色度範囲に基づいて特徴領域の候補をさらに検出する第2の検出ステップと、前記第1および第2の検出ステップで検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定ステップとを含むことを特徴とする。   According to a tenth aspect of the present invention, in the image processing method for detecting a specific feature region from image data, a first detection step of detecting the feature region candidate based on a preset chromaticity range; A reset determination step for determining whether or not the chromaticity range needs to be reset based on chromaticity information of the feature region candidates detected in one detection step; and the resetting of the chromaticity range in the reset determination step A reset step for resetting the chromaticity range based on the chromaticity information of the feature region candidates detected in the first detection step, and resetting in the reset step. A second detection step of further detecting feature region candidates based on the determined chromaticity range, and the feature region candidates detected in the first and second detection steps are the specific feature Characterized in that it comprises a characteristic region determining step of determining whether a band.

また、第11の発明は、コンピュータに請求項1から請求項8のいずれかに記載の画像処理装置が備える各手段の機能を実現させるためのプログラムである。   An eleventh aspect of the invention is a program for causing a computer to realize the functions of the units included in the image processing apparatus according to any one of claims 1 to 8.

また、第12の発明は、第11の発明の記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体である。   The twelfth invention is a computer-readable recording medium in which the program according to the eleventh invention is recorded.

本発明によれば、個別に必要に応じた特徴領域の抽出・検出を精度良く行うことできるようになる。また、特徴領域の抽出結果を個別の画像の補正にさらに反映させる仕組みを提供することで、従来の一般的な良い画像の定義を基にした画像補正では画質を良好に補正できない撮影画像データに対しても、個別に良好な画像補正を実現することが可能となる。   According to the present invention, it is possible to accurately extract and detect feature regions individually as necessary. In addition, by providing a mechanism that further reflects the extraction results of feature regions in the correction of individual images, it is possible to obtain image data that cannot be corrected well by conventional image correction based on the general definition of good images. In contrast, it is possible to achieve good image correction individually.

以下、図面を参照して本発明の一実施形態について説明する。
図11は本発明の一実施形態による画像処理装置のハード構成を示す概略ブロック図である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 11 is a schematic block diagram showing a hardware configuration of an image processing apparatus according to an embodiment of the present invention.

図11に示すように、本実施形態の画像処理装置は、いわゆるパーソナルコンピュータの構成にて達成される。具体的には、その構成として、入出力ポート51、マウス52、キーボード53、モニタ54、制御部55、メモリカードドライブ56、ハードディスク57、およびこれら各部を接続するバス58を備える。   As shown in FIG. 11, the image processing apparatus of the present embodiment is achieved by a so-called personal computer configuration. Specifically, the configuration includes an input / output port 51, a mouse 52, a keyboard 53, a monitor 54, a control unit 55, a memory card drive 56, a hard disk 57, and a bus 58 for connecting these units.

入出力ポート51は、外部に対しデータを入出力するためのポートである。マウス52は、ポインティングデバイスの1種であり入力装置である。キーボード53は、数値や文字等を入力するための入力装置である。モニタ54は、種々の表示を行うための出力装置であり、例えば、液晶モニタ、CRTモニタ、ELディスプレイ、プラズマディスプレイ、テレビジョン受像機を用いることができる。このモニタ54としては、マウス52、キーボード53およびモニタ54の各機能を備えた、いわゆるタッチパネルを用いてもよい。   The input / output port 51 is a port for inputting / outputting data to / from the outside. The mouse 52 is a kind of pointing device and is an input device. The keyboard 53 is an input device for inputting numerical values and characters. The monitor 54 is an output device for performing various displays. For example, a liquid crystal monitor, a CRT monitor, an EL display, a plasma display, and a television receiver can be used. As the monitor 54, a so-called touch panel having the functions of the mouse 52, the keyboard 53, and the monitor 54 may be used.

制御部55は、CPUからなる処理装置であって装置全体の動作を制御し、マウス52やキーボード53からの入力に基づいて、入出力ポート51もしくは、メモリカードドライブ56において読み出された画像データに対する各種処理も行う。メモリカードドライブ56は、メモリカードに記録された画像データを読み出し、またデータを書き込むための入出力装置である。ハードディスク57は、種々のデータやプログラムを記憶する不揮発性の記憶装置である。   The control unit 55 is a processing device composed of a CPU, and controls the operation of the entire device. Based on input from the mouse 52 or the keyboard 53, the image data read by the input / output port 51 or the memory card drive 56 is read out. Various processes are also performed. The memory card drive 56 is an input / output device for reading image data recorded in the memory card and writing data. The hard disk 57 is a non-volatile storage device that stores various data and programs.

本実施形態においては、画像処理装置としてパーソナルコンピュータを例として説明するが、画像を処理できる装置であればよい。例えば、画像を扱うマルチファンクションプリンタやフォトダイレクトプリンタなどノンPCの組み込み機器や携帯電話機など、画像を扱える機器においても同様の実施形態が考えられる。   In this embodiment, a personal computer is described as an example of the image processing apparatus, but any apparatus that can process an image may be used. For example, a similar embodiment is conceivable in a device that can handle images, such as a non-PC embedded device such as a multifunction printer or a photo direct printer that handles images, or a mobile phone.

次に、上記構成にて行われる処理の流れの全体を図1に示し、本実施形態の画像処理装置の動作について説明する。   Next, the overall flow of processing performed in the above configuration is shown in FIG. 1, and the operation of the image processing apparatus of the present embodiment will be described.

はじめに、S101ステップでは、入出力ポート51もしくは、メモリカードドライブ56において読み出された画像データ、及びハードディスク57に保存している画像データを、マウス52やキーボード53からの入力操作に基づいて読み込む。   First, in step S101, image data read by the input / output port 51 or the memory card drive 56 and image data stored in the hard disk 57 are read based on an input operation from the mouse 52 or the keyboard 53.

次いで、S102ステップでは、読み込んだ画像ファイルを展開する。その一連の作業中に、取得画像に対する、画像内の特徴領域検出における設定の確認を行い、設定されている特徴領域の定義が画像中の人物肌領域である場合は、画像中の人物の肌領域を検出する処理を行う。なお、人物の肌領域からなる顔領域を検出する処理については、本願発明者による特開2004−038480号公報、特開2004−038481号公報、特開2004−038482号公報に開示されている。その他にも、入退室管理システムや監視システムにおいて動画を含む画像の中に人物の顔領域を検出する処理が知られている。   In step S102, the read image file is expanded. During the series of operations, the settings for the feature region detection in the image are confirmed for the acquired image, and if the set feature region definition is a human skin region in the image, the skin of the person in the image Processing to detect an area is performed. Note that the processing for detecting a face region made up of a person's skin region is disclosed in Japanese Patent Application Laid-Open Nos. 2004-038480, 2004-038481, and 2004-038482 by the inventors of the present application. In addition, a process for detecting a human face area in an image including a moving image in an entrance / exit management system or a monitoring system is known.

このステップでは、少なくとも色度データを用いて人物肌領域もしくは顔領域の特徴判定を行い、合致した領域を抽出し、その情報を保持すると共に、抽出した領域の特徴量を算出し保持する。ここでは、少なくとも輝度平均値や画素数を含むサイズ情報等を含む。   In this step, at least the chromaticity data is used to determine the characteristics of the human skin area or the face area, the matched area is extracted, the information is held, and the feature amount of the extracted area is calculated and held. Here, at least the luminance average value and the size information including the number of pixels are included.

ここで、画像中の人物肌領域を特徴領域とする場合について、図10の検出処理フローチャートを基に詳細に説明する。   Here, the case where the human skin region in the image is used as the feature region will be described in detail based on the detection processing flowchart of FIG.

S101ステップにおいて入力した画像データに対して、S1001ステップでは、Jpeg画像の圧縮単位である8*8画素を単位とした色度と配置組み合わせによる人物肌領域候補グループの検出処理を実行する。このS1001ステップにおける候補グループの検出が、本実施形態の中心の内容となるが、詳細は後述する。   In step S1001, the human skin region candidate group detection process is performed on the image data input in step S101 by using a combination of chromaticity and arrangement in units of 8 * 8 pixels, which are JPEG image compression units. The detection of candidate groups in step S1001 is the central content of the present embodiment, and details will be described later.

S1002ステップでは、S1001ステップにおいて候補となるグループを検出したか判定する。検出に失敗した場合は、S1006ステップへ移行して人物肌領域の検出に失敗したことをセットする[HM=“0000”](ここで、HMは、人物肌領域検出の成功/失敗を示す識別子である)。検出に成功した場合は、S1003ステップへ移行する。   In step S1002, it is determined whether a candidate group has been detected in step S1001. If the detection fails, the process proceeds to step S1006 to set that the detection of the human skin area has failed [HM = “0000”] (where HM is an identifier indicating the success / failure of the human skin area detection) Is). If the detection is successful, the process proceeds to step S1003.

一方、S1002ステップにおいて上記候補グループの検出に成功したと判定された場合は、S1003ステップへ移行し、所望の特徴領域である人物肌領域候補のグループに対して、予め設定して保存してある空間周波数特性の範囲に適合するか比較する。   On the other hand, if it is determined in step S1002 that the candidate group has been successfully detected, the process proceeds to step S1003, and the human skin area candidate group that is a desired feature area is set and stored in advance. Compared with the range of spatial frequency characteristics.

S1004ステップでは、検出された人物肌領域候補のグループが所望の特徴領域である人物肌領域として適合するものであるか判定する。判定の結果、所望の特徴領域である人物肌領域でないと判定された場合は、S1006ステップへ移行し、一方、人物肌領域であると判定された場合は、S1005ステップへ移行する。   In step S1004, it is determined whether the detected group of human skin area candidates is suitable as a human skin area that is a desired feature area. As a result of the determination, if it is determined that the human skin area is not a desired feature area, the process proceeds to step S1006. On the other hand, if it is determined to be a human skin area, the process proceeds to step S1005.

S1006ステップでは、人物肌領域の検出に失敗したことをセットする[HM=“0000”]。また、S1005ステップでは、人物肌領域の検出に成功したことをセットする[HM=“1111”]。そして、検出した特徴領域の特徴量データ(前述)を保存する。   In step S1006, the fact that the detection of the human skin area has failed is set [HM = “0000”]. In step S1005, the fact that the human skin area has been successfully detected is set [HM = “1111”]. Then, the feature amount data (described above) of the detected feature region is stored.

なお、本発明は、上記特徴領域検出手段/方法に限定されるものではなく、他の人物顔検出、個人顔承認による検出方法に置き換えることも可能である。   Note that the present invention is not limited to the above-described feature region detection means / method, and can be replaced with a detection method based on other human face detection or personal face approval.

ここで図1に戻り、S103ステップにおいて、S102ステップにおける検出結果“HM”が“1111”であると判定された場合には、画像から抽出した特徴領域を利用した補正用テーブルを作成する必要があると判定する。そして、この特徴領域の特徴量に基づき補正用テーブルを作成する。   Returning to FIG. 1, when it is determined in step S103 that the detection result “HM” in step S102 is “1111”, it is necessary to create a correction table using the feature region extracted from the image. Judge that there is. Then, a correction table is created based on the feature amount of the feature region.

一方、S103ステップにおいて、S102ステップにおける検出結果の“HM”が“0000”と判定された場合には、そのままS104ステップへ移行する。   On the other hand, if it is determined in step S103 that the detection result “HM” in step S102 is “0000”, the process proceeds to step S104.

S104ステップでは、S103ステップにおいて特徴領域の特徴量に基づいて作成される補正用テーブルの有無を判断して、存在しない場合は特徴領域の検出結果を反映しない全領域に共通の定義に基づく画像補正を実行する。一方、補正用テーブルが存在する場合は、特徴領域の検出結果を反映するように、共通の定義に基づく画像補正に対して、作成された補正用テーブルを利用できるように、特徴領域部分について共通定義の補正用テーブルと置き換えを行った後に画像補正を実行する。なお、この画像補正の処理自体は、従来と同様の手法を用いることができる。   In step S104, the presence / absence of a correction table created based on the feature amount of the feature area in step S103 is determined, and if it does not exist, image correction based on a definition common to all areas that does not reflect the detection result of the feature area Execute. On the other hand, when there is a correction table, the feature region portion is shared so that the created correction table can be used for image correction based on the common definition so as to reflect the detection result of the feature region. Image correction is executed after replacement with the definition correction table. Note that the image correction processing itself can use the same technique as in the prior art.

次に、図10の抽出処理フローチャートにおけるS1001での候補グループの検出方法について詳細な説明を行う。
本実施形態においては、Jpeg画像の画像圧縮単位である8*8画素を色度判定のための最小単位のグループとして設定を行う。本実施形態においても使用する色度判定として最も利用され得る人物肌の色度判定方法について説明する。
Next, the method for detecting candidate groups in S1001 in the extraction processing flowchart of FIG. 10 will be described in detail.
In this embodiment, 8 * 8 pixels, which are image compression units of a Jpeg image, are set as a minimum unit group for chromaticity determination. A human skin chromaticity determination method that can be most utilized as chromaticity determination used in the present embodiment will be described.

人物肌色度の検出方法としては、複数の方法がある。知られているものとしては、
1)B(青)/G(緑)の比率が0.7〜0.8の範囲に収まり、R(赤)/G(緑)の比率が1.4〜1.8の範囲に収まる色度を持つもの。
2)図12の概念図に示すように、肌色を確率楕円にて表すことができ、この確率楕円に入るもの。なお、この確立楕円を求める式としては、周知である下記の(1)〜(3)式になる。
There are a plurality of methods for detecting the human skin chromaticity. As known,
1) A color in which the ratio of B (blue) / G (green) falls within the range of 0.7 to 0.8 and the ratio of R (red) / G (green) falls within the range of 1.4 to 1.8. Have a degree.
2) As shown in the conceptual diagram of FIG. 12, the skin color can be represented by a probability ellipse, and falls within this probability ellipse. The following formulas (1) to (3) are well known as formulas for obtaining the established ellipse.

Figure 2007334675
Figure 2007334675

Figure 2007334675
Figure 2007334675

Figure 2007334675
Figure 2007334675

ここで、 here,

Figure 2007334675
Figure 2007334675

はそれぞれ肌色の色度r,gの平均値、σ やσ はそれぞれ対応する分散である。また、ηは確率を表す係数で、η=2.0、η=1.5、η=1.0でそれぞれ確率楕円95%、84%、68%に対応する。 Are the average values of the skin color chromaticities r and g, and σ r 2 and σ g 2 are the corresponding variances. Also, η is a coefficient representing probability, and η = 2.0, η = 1.5, and η = 1.0 correspond to probability ellipses of 95%, 84%, and 68%, respectively.

本実施形態においては、処理の簡便さを考慮に入れた下記の(4)式で表される色度分布範囲を肌色の色度範囲とし、これを人物肌領域を検出するための色度の判定範囲とする。この範囲を表したのが図5である。   In the present embodiment, the chromaticity distribution range represented by the following equation (4) taking into account the simplicity of processing is set as the skin color chromaticity range, and this is used as the chromaticity distribution for detecting the human skin region. The judgment range. This range is shown in FIG.

Figure 2007334675
Figure 2007334675

次に、色度判定の為の最小単位のグループとして設定したJpeg画像の画像圧縮単位である8*8画素のグループの色度を判定する為に(4)式の色度範囲と比較判定する8*8画素のグループの色度代表値をどのように設定するかを考える。   Next, in order to determine the chromaticity of the group of 8 * 8 pixels, which is the image compression unit of the Jpeg image set as the minimum unit group for chromaticity determination, it is compared with the chromaticity range of equation (4). Consider how to set the chromaticity representative value for a group of 8 * 8 pixels.

一例を図7に示す。図7は、本実施形態で用いる色度検出ポイントを図示したものである。これによると8*8画素単位ブロックの四隅の色度の全てが(4)式の色度範囲に入っているかを確認し、全てが範囲に入っている時は、そのブロックが適合色度であると判定するものである。   An example is shown in FIG. FIG. 7 illustrates chromaticity detection points used in this embodiment. According to this, it is confirmed whether all the chromaticities at the four corners of the 8 * 8 pixel unit block are within the chromaticity range of the equation (4). It is determined that there is.

図7においては上段の左から2番目と下段の左から1,2,3ブロックが適合色度に該当する。上段の一番左のブロックは4ポイントのうち左上の色度は非肌色ピクセルと判定されるので、これを含むブロックは肌色の範囲外と判定される。同じように上段の右側1,2ブロックと下段の一番右のブロックが範囲外となる。   In FIG. 7, the second chromaticity from the left in the upper stage and the 1, 2, and 3 blocks from the left in the lower tier correspond to the matching chromaticity. In the upper leftmost block, the chromaticity at the upper left of the four points is determined to be a non-skin color pixel, and therefore a block including this is determined to be outside the skin color range. Similarly, the upper right 1 block and the lower right 2 block are out of range.

次に、図10のS1001ステップにおける候補グループ検出方法の詳細説明フローチャートとして、画像の中で最も重要と思われる人物肌領域の検出を説明するフローチャートを図6に示し、S1001ステップの詳細をさらに説明する。   Next, as a detailed explanation flowchart of the candidate group detection method in step S1001 of FIG. 10, a flowchart for explaining detection of the human skin area considered to be the most important in the image is shown in FIG. 6, and the details of step S1001 are further explained. To do.

S601ステップでは、取得したJpeg画像データから8*8画素のブロック単位のDCTデータと量子化テーブルを取得すると同時に、画像データはRGBビットマップデータに展開する。   In step S601, DCT data and a quantization table of 8 * 8 pixel block units are acquired from the acquired Jpeg image data, and at the same time, the image data is developed into RGB bitmap data.

次に、S602ステップで、画像データを構成する各8*8画素のブロックの輝度および色度データを抽出し、予め用意した閾値と比較することで分類を実行する。   Next, in step S602, the luminance and chromaticity data of each 8 * 8 pixel block constituting the image data are extracted, and classification is performed by comparing with the threshold values prepared in advance.

検索範囲は全画面に対し行っても良いが、本実施形態においては、注目する人物肌領域が画像の端部に配置されているとは考え難いので、画像端部より数ブロック分の領域は色度検索の対象から外して検索を行う。この場合、入力画像サイズにより8*8画素ブロックの画像が全画像に対して占める割合が違うので、入力画像サイズに比例した端部の設定を行う。例えばVGA(640*480)では8ブロック分で、UXGA(1600*1200)画像においては20ブロック分とする。   The search range may be performed on the entire screen, but in this embodiment, since it is difficult to think that the human skin area of interest is located at the edge of the image, the area for several blocks from the edge of the image is The search is excluded from the chromaticity search target. In this case, since the ratio of the 8 * 8 pixel block image to the entire image differs depending on the input image size, the end portion proportional to the input image size is set. For example, it is 8 blocks for VGA (640 * 480) and 20 blocks for UXGA (1600 * 1200) images.

この部分の詳細について図2のフローチャートを参照し説明する。   Details of this portion will be described with reference to the flowchart of FIG.

S201ステップにおいて、入力画像を8*8画素ブロックに分解したブロックごとに輝度データを収集する。Jpeg輝度データにおけるDC成分(直流成分)として、8*8画素データの輝度平均値を代表値として検出する。   In step S201, luminance data is collected for each block obtained by dividing the input image into 8 * 8 pixel blocks. As a DC component (direct current component) in Jpeg luminance data, a luminance average value of 8 * 8 pixel data is detected as a representative value.

次いで、S202ステップで、色度判定対象の各8*8画素ブロックに対して、色度判定手段を決定する。   Next, in step S202, chromaticity determination means is determined for each 8 * 8 pixel block to be subjected to chromaticity determination.

色度判定において、可変する可能性があるのは、判定における適合範囲である肌色のRG色度分布の値である。可変にあたっては、不図示ではあるが、S1001ステップからS1004ステップまでの候補グループ検出の内部処理において、最初に検出した候補に対して色度判定を行う。そして、色度判定の適合範囲の再設定が必要か判断し、その結果により再測定が必要と判断した場合は、再測定する為の適合範囲である肌色のRG色度分布の値を算出し、その値を使用して再測定を実行する。詳細は、後述する。   In the chromaticity determination, there is a possibility of variation in the value of the RG chromaticity distribution of the skin color that is the matching range in the determination. In the variable, although not shown, in the internal processing of candidate group detection from step S1001 to step S1004, chromaticity determination is performed on the first detected candidate. Then, it is determined whether it is necessary to reset the conformity range for chromaticity determination, and when it is determined that remeasurement is necessary, the value of the RG chromaticity distribution of the skin color that is the conformity range for remeasurement is calculated. , Perform remeasurement using that value. Details will be described later.

S203ステップでは、各8*8画素ブロックに対して、決定された色度判定手段に従い、色度の判定を実行する。   In step S203, chromaticity determination is executed for each 8 * 8 pixel block according to the determined chromaticity determination means.

次いで、S204ステップでは、S203ステップの判定結果に基づき、各8*8画素ブロックの色度が特徴領域の対象として適合するものを選別する。この選別により選ばれた8*8画素ブロックの領域を対象に、領域の大きさや、空間周波数特性による特徴量などの定義範囲との一致度により特徴領域の検出および判定を進める。詳細は、後述する。   Next, in step S204, based on the determination result in step S203, the chromaticity of each 8 * 8 pixel block is selected as a feature region target. For the region of 8 * 8 pixel block selected by this selection, detection and determination of the feature region are advanced by the degree of coincidence with the definition range such as the size of the region and the feature amount by the spatial frequency characteristic. Details will be described later.

上記検出をブロックベースにすることにより、特定のまとまりを持ったものを対象とすることになるので、外来ノイズの影響は受け難くなる。しかしながら、8*8画素のブロックが適正なまとまりの大きさとは言えないので、色度によるブロック検出においても縦方向及び横方向に隣接したブロックの連続検出という制約を付けた検出を行うことで更に精度を上げることができる。   By making the above detection block-based, a target having a specific unit is targeted, so that it is difficult to be affected by external noise. However, since the block of 8 * 8 pixels cannot be said to be an appropriate group size, even in the block detection based on chromaticity, it is further possible to perform detection with a restriction of continuous detection of blocks adjacent in the vertical and horizontal directions. The accuracy can be increased.

ここにおいて、人の肌色であってもプリントした際、顔を認識できるデータ量を満たさないものは適応外としてはじいても良いと言う考えで、こうしたものをノイズと判定する連続範囲を設定する。この部分を表したのが図6のS603ステップ以降である。以下では、図6を参照し説明する。   Here, even if it is a person's skin color, when it prints, the thing which does not satisfy | fill the data amount which can recognize a face may be rejected as a non-adaptation, and the continuous range which determines such a thing as noise is set. This part is shown after step S603 in FIG. Hereinafter, a description will be given with reference to FIG.

S603ステップでは、画像に対して長手方向に対して、色度範囲に適合と判断したブロックごとに検出を行い、連続して検出されたブロックの連続検出ブロック数の多い順に候補を検索する。   In step S603, detection is performed for each block determined to be suitable for the chromaticity range in the longitudinal direction with respect to the image, and candidates are searched in descending order of the number of consecutively detected blocks.

次いでS604ステップにおいて、適合色度範囲に適合した連続検出ブロックが検出されたか判断する。対象の連続検出ブロックがある場合はS606ステップへ進む。また、対象の連続検出ブロックがない場合はS605ステップへ進む。   Next, in step S604, it is determined whether a continuous detection block suitable for the suitable chromaticity range has been detected. If there is a target continuous detection block, the process proceeds to step S606. If there is no target continuous detection block, the process proceeds to step S605.

S605ステップでは、入力した画像データの中に抽出対象となる特徴領域が無いことをセットして処理を終了する。ここでは所定の識別子に、抽出対象となる特徴領域が無いことを示す値を設定する。   In step S605, it is set that there is no feature area to be extracted in the input image data, and the process is terminated. Here, a value indicating that there is no feature region to be extracted is set in the predetermined identifier.

一方、S606ステップでは、画像の短手方向に対して、適合色度範囲に適合すると判断したブロックごとに、予め定義してある連続量を含むものを検索し、S607ステップへ移る。   On the other hand, in step S606, a block including a continuous amount defined in advance is searched for each block that is determined to be compatible with the appropriate chromaticity range in the short direction of the image, and the process proceeds to step S607.

S607ステップにおいては、入力した画像データの中に抽出対象となる特徴領域候補が存在するか判定を行う。存在しない結果を得た場合、すなわち検出データが無い場合はS605ステップへ進み、特徴領域が無いことをセットして(S605と同様にして)、処理を終了する。一方、対象となる候補データが存在する場合はS608ステップへ進む。   In step S607, it is determined whether there is a feature region candidate to be extracted in the input image data. If a non-existent result is obtained, that is, if there is no detected data, the process proceeds to step S605 to set that there is no feature area (similar to S605), and the process ends. On the other hand, if there is target candidate data, the process proceeds to step S608.

S608ステップでは、抽出対象となる特徴領域候補データに長手方向の連続ブロック数の大きいものから順に候補番号(1〜n)を付ける。特徴領域候補データは1つしかない場合は番号1となるが、特徴領域候補データが複数の場合は最大で8個まで候補番号を発行する。候補番号を持った領域の中で、その後、最終の目標領域となるものを判定する。   In step S608, candidate numbers (1 to n) are assigned to feature region candidate data to be extracted in descending order of the number of continuous blocks in the longitudinal direction. When there is only one feature area candidate data, the number is 1, but when there are a plurality of feature area candidate data, up to 8 candidate numbers are issued. From among the areas having candidate numbers, a final target area is determined.

次いでS609ステップにおいて、判定対象となる特徴領域候補データの候補番号が発行された数(n)より大きくないことを確認してS610ステップへ進む。また、候補番号より大きくなった場合は、すべての候補について判定が終了したと判定し、処理を終了し、図10のS1002ステップへ移行する。   Next, in step S609, it is confirmed that the candidate number of the feature area candidate data to be determined is not larger than the issued number (n), and the process proceeds to step S610. If it is greater than the candidate number, it is determined that the determination has been completed for all candidates, the process ends, and the process proceeds to step S1002 in FIG.

S610ステップでは、色度判定に適合した判定対象となる特徴領域候補データに対して、その空間周波数成分が抽出対象の特徴量適合範囲(予め設定してある空間周波数特性の範囲)に収まっているか比較を行う。   In step S610, with respect to the feature region candidate data that is a determination target adapted to the chromaticity determination, whether the spatial frequency component is within the feature amount adaptation range (a range of spatial frequency characteristics set in advance) to be extracted. Make a comparison.

Jpegファイルにおいてはすべての画像領域の画素情報を8*8画素単位のグループで空間周波数成分に変換している。ここで言う空間周波数成分とは、Jpeg画像のデータ圧縮のために画素データを8*8画素単位でDCT変換したものである。Jpeg画像データは、周知のように、8*8ブロックデータの左上をDC成分(直流成分)として8*8画素データの平均値をとり、他をAC成分(交流成分)として主に空間周波数の低い順にその値が並べられている。つまり低周波数のものから順に配置された空間周波数データとなっている。処理済みのデータを周波数分布として、候補グループの各ブロックにおけるデータを統計処理することで、空間周波数成分における特徴量の一致を判定する。なお、ここでの統計処理は、特徴量の一致を判定するための一般的な手法を使用することができる。   In the Jpeg file, pixel information of all image regions is converted into spatial frequency components in groups of 8 * 8 pixels. The spatial frequency component referred to here is obtained by DCT-converting pixel data in units of 8 * 8 pixels for data compression of a Jpeg image. As is well known, Jpeg image data has an average value of 8 * 8 pixel data with the DC component (DC component) at the upper left of the 8 * 8 block data, and the other is AC component (AC component). The values are arranged in ascending order. That is, the spatial frequency data is arranged in order from the low frequency. By using the processed data as a frequency distribution and statistically processing the data in each block of the candidate group, it is determined whether the feature amounts in the spatial frequency component match. Note that the statistical processing here can use a general method for determining the coincidence of feature amounts.

S611ステップでは、S610ステップの結果を受け、判定を行う。適合範囲外の場合はS609ステップへ移行し、次の特徴領域候補データに対する判定に移行する。   In step S611, a determination is made based on the result of step S610. If it is outside the conforming range, the process proceeds to step S609, and the process proceeds to determination for the next feature area candidate data.

S612ステップにおいては、対象の特徴領域候補データを所望の特徴領域として認識してセットする。そしてS609ステップへ移行し、次の特徴領域候補データに対する判定に移行する。   In step S612, the target feature region candidate data is recognized and set as a desired feature region. Then, the process proceeds to step S609, and the process proceeds to determination for the next feature area candidate data.

検出候補の優先順位が高い方(検出ブロック長が長い方)から優先候補となり、隣接する色度該当ブロックをグループ化する。検出結果のグループは、優先候補順に、例えば、カラーコード(1=茶、2=赤、3=橙、4=黄、5=緑、6=青、7=紫、8=灰)順に配置される。   The detection candidate having a higher priority (the detection block having a longer length) becomes a priority candidate, and adjacent chromaticity blocks are grouped. The groups of detection results are arranged in order of priority candidates, for example, in the order of color codes (1 = brown, 2 = red, 3 = orange, 4 = yellow, 5 = green, 6 = blue, 7 = purple, 8 = gray). The

以上、説明してきたように、S1001ステップからS1004ステップまでの処理において、所望の特徴領域である人物肌領域の検出を実行する。しかし、最終候補となった特徴領域のグループに対して、フローチャートとしては不図示ではあるが、このままの検出結果でよいか判定を行う。そして、再測定が必要と判断した場合は、再測定するための適合範囲である肌色のRG色度分布の値を算出し、その値を使用してS1001ステップからS1004ステップまでの処理による再測定を実行する。   As described above, in the processing from step S1001 to step S1004, detection of a human skin region that is a desired feature region is executed. However, although it is not shown in the flowchart for the group of feature regions that are final candidates, it is determined whether the detection result can be used as it is. If it is determined that re-measurement is necessary, the value of the RG chromaticity distribution of the skin color that is the compatible range for re-measurement is calculated, and the re-measurement is performed by the processing from step S1001 to step S1004 using that value. Execute.

図3は、再設定による再測定が必要かを判定し、さらに処理する部分のフローである。以下に、これを説明する。   FIG. 3 is a flowchart of a part for determining whether re-measurement by resetting is necessary and further processing. This will be described below.

S301ステップは、前述のS1001ステップからS1004ステップまでの処理を代表してあらわしたものである。ここにおいて、画像中に所望の特徴領域である人物肌領域の特徴領域候補グループがあるか検出処理を実行する。   Step S301 represents the processing from step S1001 to step S1004 described above. Here, detection processing is performed to determine whether there is a feature region candidate group of a human skin region that is a desired feature region in the image.

S302ステップにおいて、処理の結果として特徴領域候補グループを検出した場合は、S303ステップへ移行する。一方、特徴領域候補グループを検出しなかった場合、または、特徴領域候補グループが所望の特徴領域である人物肌領域でないと判定された場合は、S306ステップへ移行する。S306ステップでは、所望の特徴領域である人物肌領域の検出に失敗したことをセットする[HM=“0000”]。   In step S302, if a feature area candidate group is detected as a result of the process, the process proceeds to step S303. On the other hand, if no feature region candidate group is detected, or if it is determined that the feature region candidate group is not a human skin region that is a desired feature region, the process proceeds to step S306. In step S306, the fact that the detection of the human skin area as the desired feature area has failed is set [HM = “0000”].

S303ステップでは、特徴領域候補グループの代表色度を算出する。代表色度の算出としては、特徴領域候補グループを構成するブロック単位の検出色度の平均値を算出し、これを代表値とする。   In step S303, the representative chromaticity of the feature region candidate group is calculated. As the calculation of the representative chromaticity, an average value of the detected chromaticities in block units constituting the feature region candidate group is calculated, and this is used as the representative value.

次いで、S304ステップにおいて、特徴領域候補グループの色度代表値である代表色度が、色度の適合判定に使用された色度範囲の中心からの離れ具合に基づいて、特徴領域候補グループの肌色領域検出に対して有効な色度範囲の判定値であったかを判断する。詳細は、後述する。ここで人物肌領域と判定された場合は、S305ステップへ移行する。   Next, in step S304, the representative chromaticity, which is the chromaticity representative value of the feature region candidate group, is determined based on the degree of separation from the center of the chromaticity range used for the chromaticity suitability determination, and the skin color of the feature region candidate group It is determined whether or not the chromaticity range determination value is effective for area detection. Details will be described later. If it is determined that the human skin area, the process proceeds to step S305.

S305ステップでは、人物肌領域の検出に成功したことをセットする[HM=“1111”]。さらに、検出した特徴領域の特徴量データを保存する。   In step S305, the fact that the human skin area has been successfully detected is set [HM = “1111”]. Further, feature amount data of the detected feature region is stored.

ここで、有効な色度範囲の判定について説明する。   Here, determination of an effective chromaticity range will be described.

図4は、不特定で複数の画像データより、被写体として人物肌領域の色度を測定し、プロットした実データである。縦軸は、緑色成分の色度(G/R+G+B)をあらわす。横軸は、赤色成分の色度(R/R+G+B)をあらわす。   FIG. 4 shows actual data obtained by measuring and plotting the chromaticity of a human skin area as a subject from a plurality of unspecified image data. The vertical axis represents the chromaticity (G / R + G + B) of the green component. The horizontal axis represents the chromaticity (R / R + G + B) of the red component.

固定の適合色度範囲により1回の測定で判定を行う従来の測定方式で人物肌領域の検出に成功したものを(○)でプロットし、検出に失敗したか、もしくは、検出したが、検出した領域が不完全であった場合を(△)でプロットしている。先の(4)式で示した適合色度に収まる範囲で、検出に成功したものが多く、適合色度範囲の境界付近もしくはそれより外に分布している被写体の肌色は検出に失敗していることがわかる。この原因は、撮影環境として色かぶりしたものなどが要因と考えられる。この場合においても、適合色度範囲の境界付近のものについては、検出した特徴領域候補グループの色度代表値を元に(4)式で示した適合色度を再設定することで、当初より良好な検出ができる。   A conventional measurement method that makes a determination in a single measurement with a fixed chromaticity range is plotted with a circle (○), and detection has failed or has been detected. The case where the completed area is incomplete is plotted with (Δ). In many cases, the detection has succeeded in the range that falls within the matching chromaticity shown in the above equation (4), and the skin color of the subject distributed near or outside the boundary of the matching chromaticity range has failed to be detected. I understand that. The cause of this is considered to be a color cast as a shooting environment. Even in this case, for those near the boundary of the adaptive chromaticity range, by resetting the adaptive chromaticity represented by the equation (4) based on the chromaticity representative value of the detected feature region candidate group, Good detection is possible.

次に、特徴領域候補グループの肌色領域検出に対して有効な色度範囲の判定値であったかを判断する方法について説明する。   Next, a method for determining whether the determination value of the chromaticity range is effective for detecting the skin color area of the feature area candidate group will be described.

S302ステップの色度判定において使用する基準は前述の(4)式で表した色度範囲である。つまり、赤色成分の色度[R/(R+G+B)]の適合範囲が“0.35〜0.44”、緑色成分の色度[G/(R+G+B)]の適合範囲が“0.29〜0.33”に特徴領域候補グループの肌色領域が収まるものを人物の肌領域と判定している。   The reference used in the chromaticity determination in step S302 is the chromaticity range expressed by the above-described equation (4). That is, the compatible range of the chromaticity [R / (R + G + B)] of the red component is “0.35 to 0.44”, and the compatible range of the chromaticity [G / (R + G + B)] of the green component is “0.29 to 0. .33 ″ where the skin color region of the feature region candidate group falls is determined as the human skin region.

図8を用いて従来の検出方法を用いた検出結果を示すと、図8の1)は、人物を被写体とした元画像である。図8の2)が肌色領域の適合判定を(4)式の基準のみで判定した場合の特徴領域候補グループである。第1の候補グループとなった左上の検出領域(左上の人顔に対応する部分)と実際の元画像における人物の肌の領域を比べると検出された領域の方が実態よりも少ないことがわかる。   FIG. 8 shows a detection result using the conventional detection method. In FIG. 8, 1) is an original image with a person as a subject. 8) is a feature region candidate group in the case where the skin color region conformity determination is determined based only on the criterion of equation (4). Comparing the upper left detection area (part corresponding to the upper left human face) that is the first candidate group with the person's skin area in the actual original image, it can be seen that the detected area is less than the actual area. .

この特徴領域候補グループの中で第1の候補グループにおける色度代表値は赤成分の色度[R/(R+G+B)]は“0.375”、緑成分の色度[G/(R+G+B)]の適合範囲は“0.300”と算出された。   Among the feature region candidate groups, the chromaticity representative value in the first candidate group is that the red component chromaticity [R / (R + G + B)] is “0.375”, and the green component chromaticity [G / (R + G + B)]. The matching range was calculated as “0.300”.

(4)式で規定した適合色度範囲と図8の第1の候補グループにおける色度代表値との関係を表したものが図13である。   FIG. 13 shows the relationship between the compatible chromaticity range defined by the equation (4) and the chromaticity representative value in the first candidate group of FIG.

同図において、縦軸は、緑色成分の色度(G/R+G+B)を表し、最低値が“0.290”、最高値が“0.330”である。横軸は、赤色成分の色度(R/R+G+B)を表し、最低値が“0.350”、最高値が“0.440”である。中央の“O”は、緑色成分の色度が“0.310”、赤色成分の色度が“0.395”となる。中央の“O”を中心として半径“R”が“0.020”の範囲に入る領域とそれ以外の領域に分ける。   In the figure, the vertical axis represents the chromaticity (G / R + G + B) of the green component, with the lowest value being “0.290” and the highest value being “0.330”. The horizontal axis represents the chromaticity (R / R + G + B) of the red component, where the lowest value is “0.350” and the highest value is “0.440”. In the center “O”, the chromaticity of the green component is “0.310” and the chromaticity of the red component is “0.395”. The region is divided into a region in which the radius “R” is within the range of “0.020” with the center “O” as the center and the other regions.

中央の“O”を中心として半径“R”内に第1の候補グループにおける色度代表値が入るものについては、S304ステップにおいて、肌色領域検出に対して有効な色度範囲の判定値だと判定する。   For the case where the chromaticity representative value in the first candidate group falls within the radius “R” with the center “O” as the center, the determination value of the chromaticity range that is effective for the skin color area detection in step S304 judge.

また、中央の“O”を中心として半径“R”内に第1の候補グループにおける色度代表値が入っていない場合で、かつ、(4)式で規定した適合色度範囲に入っている場合は、次のようにする。すなわち、図8における第1の候補グループの検出位置(図13の☆印)においては、人物の肌色としては適合範囲に収まるが、図3のフローにおけるS304ステップでは、S307ステップへ進む検出用色度範囲の再設定と再処理を要求される対象と判定される。   In addition, when the representative chromaticity value in the first candidate group is not included in the radius “R” with the center “O” as the center, the chromaticity range is defined in the equation (4). If so: That is, at the detection position of the first candidate group in FIG. 8 (marked with a star in FIG. 13), the detection color that falls within the applicable range as the human skin color, but proceeds to step S307 in step S304 in the flow of FIG. It is determined that the degree range needs to be reset and reprocessed.

S307ステップでは、第1の候補グループにおける色度代表値を中心として、赤色成分の色度(R/R+G+B)の適合幅“0.090”、緑色成分の色度(G/R+G+B)の適合幅“0.040”をもつ新しい検出用色度の適合基準を算出して、セットする。なお、この例では、適合色度範囲の幅は初期値と同じであるが中心が異なるものとなっている。   In step S307, with the chromaticity representative value in the first candidate group as the center, the adaptation width “0.090” of the chromaticity of the red component (R / R + G + B) and the adaptation width of the chromaticity of the green component (G / R + G + B) Calculate and set a new chromaticity matching criterion for detection with “0.040”. In this example, the width of the adaptive chromaticity range is the same as the initial value, but the center is different.

この場合における図8の元画像から検出した第1の候補グループにおける色度代表値を中心として、新しい検出用色度の適合基準を作成した結果を図9に示す。初期値の検出基準である色度範囲を実線で示し、新しい検出用色度による適合基準である色度範囲を点線で示す。適合色度範囲が移動したことを確認することができる。   FIG. 9 shows a result of creating a new detection chromaticity matching criterion centering on the chromaticity representative value in the first candidate group detected from the original image of FIG. 8 in this case. The chromaticity range, which is the detection criterion for the initial value, is indicated by a solid line, and the chromaticity range, which is the adaptation criterion for the new detection chromaticity, is indicated by a dotted line. It can be confirmed that the adaptive chromaticity range has moved.

その後、S308ステップにおいて、S301ステップと同等な検出処理を実行する。   Thereafter, in step S308, detection processing equivalent to that in step S301 is executed.

次いで、S309ステップでは、特徴領域候補グループを検出しなかったと判定された場合、または、特徴領域候補グループが所望の特徴領域である人物肌領域でないと判定された場合は、S306ステップへ移行する。
S306ステップでは、所望の特徴領域である人物肌領域の検出に失敗したことをセットする[HM=“0000”]。
Next, in step S309, if it is determined that no feature region candidate group has been detected, or if it is determined that the feature region candidate group is not a human skin region that is a desired feature region, the process proceeds to step S306.
In step S306, the fact that the detection of the human skin area as the desired feature area has failed is set [HM = “0000”].

一方、S309ステップにおいて、特徴領域候補グループを検出した場合は、S305ステップへ移行する。
S305ステップにおいては、人物肌領域の検出に成功したことをセットする[HM=“1111”]。そして、検出した特徴領域の特徴量データを保存する。
On the other hand, if a feature region candidate group is detected in step S309, the process proceeds to step S305.
In step S305, the fact that the human skin area has been successfully detected is set [HM = “1111”]. Then, the feature amount data of the detected feature region is stored.

図8の3)は、前述の新しい検出用色度の適合基準を用いて所望する特徴領域を検出した結果である。図8の2)の検出結果に比べて明らかに良好な検出ができていることが確認できる。   3) of FIG. 8 shows the result of detecting a desired feature region using the above-described new detection chromaticity matching criteria. It can be confirmed that the detection is clearly better than the detection result of 2) in FIG.

本実施形態の説明においては、最終候補のグループの代表値を用いて再測定のための判定及び、再測定する為の適合範囲である肌色のRG色度分布の値を算出した。このとき、最終候補グループが複数存在する場合は、その複数グループごと代表値を用いて、再測定する為の適合色度範囲である肌色のRG色度分布の値を算出することも、更に有効である。   In the description of the present embodiment, the determination for remeasurement using the representative value of the final candidate group and the value of the RG chromaticity distribution of the skin color that is the matching range for remeasurement are calculated. At this time, when there are a plurality of final candidate groups, it is also more effective to calculate the value of the RG chromaticity distribution of the skin color that is the compatible chromaticity range for remeasurement using the representative value for each of the plurality of groups. It is.

また、本実施の形態では、画像圧縮ファイルとして、“Jpegファイル”を利用した方法を開示した。もちろん、“Jpeg2000 file“など、周波数成分への変換を利用した他のファイルに対しても同様な考え方で、特徴領域の検出を簡単な処理で実現できることは、言うまでもない。   In the present embodiment, a method using a “JPEG file” as an image compression file has been disclosed. Of course, it is needless to say that the feature region detection can be realized by a simple process with respect to other files using the conversion to the frequency component such as “Jpeg2000 file” in the same way.

なお、以上に説明した本実施形態の画像処理装置は、前述のようにコンピュータのCPUあるいはMPU、RAM、ROMなどで構成されるものであり、RAMやROMに記憶されたプログラムが動作することによって実現できる。   The image processing apparatus according to the present embodiment described above is constituted by a computer CPU or MPU, RAM, ROM, etc. as described above, and the program stored in the RAM or ROM operates. realizable.

したがって、コンピュータが上記機能を果たすように動作させるプログラムを、例えばCD−ROMのような記録媒体に記録し、コンピュータに読み込ませることによって実現できるものである。上記プログラムを記録する記録媒体としては、CD−ROM以外に、フレキシブルディスク、ハードディスク、磁気テープ、光磁気ディスク、不揮発性メモリカード等を用いることができる。   Therefore, a program that causes a computer to perform the above functions can be realized by recording the program on a recording medium such as a CD-ROM and causing the computer to read the program. As a recording medium for recording the program, a flexible disk, a hard disk, a magnetic tape, a magneto-optical disk, a nonvolatile memory card, and the like can be used in addition to the CD-ROM.

また、コンピュータが供給されたプログラムを実行することにより上述の実施形態の機能が実現されるようなプログラムは、本発明の実施形態に含まれる。このようなプログラムが、コンピュータにおいて稼働しているOS(オペレーティングシステム)あるいは他のアプリケーションソフト等と共同して、上述の実施形態の機能が実現される場合もあり得る。あるいは、コンピュータに供給されたプログラムの処理の全てあるいは一部がコンピュータの機能拡張ボードや機能拡張ユニットにより行われて上述の実施形態の機能が実現される場合もあり得る。   A program in which the functions of the above-described embodiments are realized by executing a program supplied by a computer is included in the embodiments of the present invention. Such a program may realize the functions of the above-described embodiment in cooperation with an OS (operating system) running on a computer or other application software. Alternatively, all or part of the processing of the program supplied to the computer may be performed by the function expansion board or function expansion unit of the computer to realize the functions of the above-described embodiment.

また、本発明をネットワーク環境で利用するべく、全部あるいは一部のプログラムが他のコンピュータで実行されるようになっていても良い。例えば、画面入力処理は、遠隔端末コンピュータで行われ、各種判断、記録等は他のセンターコンピュータ等で行われるようにしても良い。   In order to use the present invention in a network environment, all or a part of the program may be executed on another computer. For example, the screen input process may be performed by a remote terminal computer, and various determinations, recording, and the like may be performed by another center computer.

本発明の一実施形態に関わる処理の全体の流れを表すフローチャートである。It is a flowchart showing the flow of the whole process in connection with one Embodiment of this invention. 本発明の一実施形態に関わる画素グループの輝度および色度検出と判定のフローチャートである。It is a flowchart of the brightness | luminance and chromaticity detection and determination of a pixel group concerning one Embodiment of this invention. 本発明の一実施形態に関わる色度定義における再定義判定及び処理のフローチャートである。6 is a flowchart of redefinition determination and processing in chromaticity definition according to an embodiment of the present invention. 本発明の一実施形態に関わる複数画像サンプルから抽出した検出及び検出が不十分な領域における色度分布のデータである。It is the data of the chromaticity distribution in the area | region which was extracted from the several image sample concerning one Embodiment of this invention, and the detection is inadequate. 本発明の一実施形態に関わる肌色のRG色度分布である。It is RG chromaticity distribution of the skin color in connection with one Embodiment of this invention. 本発明の一実施形態に関わるJpeg画像解凍からの人物肌領域検出のフローチャートである。It is a flowchart of the person skin area | region detection from the JPEG image decompression | decompression concerning one Embodiment of this invention. 本発明の一実施形態に関わる、Jpegファイル画像圧縮単位である8*8Blockにおける色度判定方法の一例である。It is an example of the chromaticity determination method in 8 * 8Block which is a JPEG file image compression unit according to an embodiment of the present invention. (1)対象画像である元画像、(2)従来の検出結果(色度1pass)、(3)本発明による検出結果(色度2pass)を示す図である。It is a figure which shows (1) the original image which is a target image, (2) the conventional detection result (chromaticity 1pass), (3) the detection result (chromaticity 2pass) by this invention. 本発明の一実施形態に関わる適合色度範囲に対して、検出用色度範囲を算出し直した場合の例を示す図である。It is a figure which shows the example at the time of recalculating the detection chromaticity range with respect to the suitable chromaticity range in connection with one Embodiment of this invention. 本発明の一実施形態に関わる人物肌領域検出処理の概要フローチャートである。It is a general | schematic flowchart of the person skin area | region detection process in connection with one Embodiment of this invention. 本発明の一実施形態に関わる画像処理装置のハード構成である。1 is a hardware configuration of an image processing apparatus according to an embodiment of the present invention. 本発明の一実施形態に関わる肌色のRG色度分布を示す確立楕円範囲の例を示す図である。It is a figure which shows the example of the establishment ellipse range which shows RG chromaticity distribution of the skin color in connection with one Embodiment of this invention. 本発明の一実施形態に関わる肌色のRG色度範囲と第1の候補グループにおける色度代表値との関係を表した図である。It is a figure showing the relationship between the RG chromaticity range of the skin color in connection with one Embodiment of this invention, and the chromaticity representative value in a 1st candidate group.

符号の説明Explanation of symbols

51…入出力ポート
52…マウス
53…キーボード
54…モニタ
55…制御部
56…メモリカードドライブ
57…ハードディスク
51 ... Input / output port 52 ... Mouse 53 ... Keyboard 54 ... Monitor 55 ... Control unit 56 ... Memory card drive 57 ... Hard disk

Claims (12)

画像データから特定の特徴領域を検出する画像処理装置において、
予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出手段と、
前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定手段と、
前記再設定手段により再設定された色度範囲に基づいて前記特徴領域の候補をさらに検出する第2の検出手段と、
前記第1の検出手段または第2の検出手段で検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus for detecting a specific feature region from image data,
First detection means for detecting a candidate for the feature region based on a preset chromaticity range;
Resetting means for resetting the chromaticity range based on chromaticity information of candidate feature regions detected by the first detection means;
Second detection means for further detecting the candidate for the feature region based on the chromaticity range reset by the resetting means;
An image processing apparatus comprising: a feature region determination unit that determines whether a candidate for a feature region detected by the first detection unit or the second detection unit is the specific feature region.
画像データから特定の特徴領域を検出する画像処理装置において、
予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出手段と、
前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲の再設定の要否を判断する再設定判定手段と、
前記再設定判定手段により前記色度範囲の再設定を要すと判定された場合に、前記第1の検出手段により検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定手段と、
前記再設定手段により再設定された色度範囲に基づいて特徴領域の候補をさらに検出する第2の検出手段と、
前記第1および第2の検出手段で検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus for detecting a specific feature region from image data,
First detection means for detecting a candidate for the feature region based on a preset chromaticity range;
Resetting determination means for determining whether or not the chromaticity range needs to be reset based on chromaticity information of candidate feature regions detected by the first detection means;
When the reset determination unit determines that the chromaticity range needs to be reset, the chromaticity range is reset based on the chromaticity information of the feature region candidates detected by the first detection unit. Resetting means to
Second detection means for further detecting feature region candidates based on the chromaticity range reset by the resetting means;
An image processing apparatus comprising: a feature region determination unit that determines whether a feature region candidate detected by the first and second detection units is the specific feature region.
前記第1および第2の検出手段における検出処理は、前記画像データに対し特定サイズのブロック単位で行うことを特徴とする請求項1または請求項2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the detection processing in the first and second detection units is performed on the image data in units of a block having a specific size. 前記特徴領域の候補は、候補として検出された連続するブロック群からなることを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the feature region candidates include a group of consecutive blocks detected as candidates. 前記再設定手段は、特徴領域の候補毎に前記色度範囲を再設定することを特徴とする請求項1から請求項4のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the resetting unit resets the chromaticity range for each feature region candidate. 前記特徴領域判定手段は、前記特徴領域の候補がもつ空間周波数特性に基づいて前記判断を行うことを特徴とする請求項1から請求項5のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature region determination unit performs the determination based on a spatial frequency characteristic of the feature region candidate. 前記特徴領域は、少なくとも人物の肌領域を含むことを特徴とする請求項1から請求項6のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature region includes at least a human skin region. 画像補正手段および補正情報作成手段をさらに備え、前記補正情報作成手段は、前記特徴領域用の補正情報を作成し、前記画像補正手段は、前記特徴領域については作成された補正情報を用いて画像補正処理を行い、その他の領域については予め全領域共通に定義された画像補正処理を行うことを特徴とする請求項1から請求項7のいずれかに記載の画像処理装置。   The image processing apparatus further includes an image correction unit and a correction information generation unit, wherein the correction information generation unit generates correction information for the feature region, and the image correction unit uses the correction information generated for the feature region to generate an image. 8. The image processing apparatus according to claim 1, wherein correction processing is performed, and image correction processing defined in advance for all regions is performed for other regions. 画像データから特定の特徴領域を検出する画像処理方法において、
予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出ステップと、
前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定ステップと、
前記再設定ステップにおいて再設定された色度範囲に基づいて前記特徴領域の候補をさらに検出する第2の検出ステップと、
前記第1の検出ステップまたは第2の検出ステップで検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定ステップと
を含むことを特徴とする画像処理方法。
In an image processing method for detecting a specific feature region from image data,
A first detection step of detecting a candidate for the feature region based on a preset chromaticity range;
A resetting step of resetting the chromaticity range based on the chromaticity information of the feature region candidates detected in the first detection step;
A second detection step for further detecting the feature region candidates based on the chromaticity range reset in the resetting step;
An image processing method comprising: a feature region determination step of determining whether a feature region candidate detected in the first detection step or the second detection step is the specific feature region.
画像データから特定の特徴領域を検出する画像処理方法において、
予め設定された色度範囲に基づいて前記特徴領域の候補を検出する第1の検出ステップと、
前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲の再設定の要否を判断する再設定判定ステップと、
前記再設定判定ステップにおいて前記色度範囲の再設定を要すと判定された場合に、前記第1の検出ステップにおいて検出された特徴領域の候補の色度情報に基づき前記色度範囲を再設定する再設定ステップと、
前記再設定ステップにおいて再設定された色度範囲に基づいて特徴領域の候補をさらに検出する第2の検出ステップと、
前記第1および第2の検出ステップで検出した特徴領域の候補が、前記特定の特徴領域であるか判断する特徴領域判定ステップと
を含むことを特徴とする画像処理方法。
In an image processing method for detecting a specific feature region from image data,
A first detection step of detecting a candidate for the feature region based on a preset chromaticity range;
A reset determination step for determining whether or not it is necessary to reset the chromaticity range based on chromaticity information of candidate feature regions detected in the first detection step;
When it is determined in the reset determination step that the chromaticity range needs to be reset, the chromaticity range is reset based on the chromaticity information of the feature region candidates detected in the first detection step. A reconfiguration step to
A second detection step of further detecting feature region candidates based on the chromaticity range reset in the resetting step;
An image processing method comprising: a feature region determination step of determining whether the feature region candidates detected in the first and second detection steps are the specific feature region.
コンピュータに請求項1から請求項8のいずれかに記載の画像処理装置が備える各手段の機能を実現させるためのプログラム。   A non-transitory computer-readable storage medium storing a program for causing a computer to realize the function of each unit included in the image processing apparatus according to claim 1. 請求項11に記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。
A computer-readable recording medium on which the program according to claim 11 is recorded.
JP2006166453A 2006-06-15 2006-06-15 Device, method and program for processing image, and recording medium Pending JP2007334675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006166453A JP2007334675A (en) 2006-06-15 2006-06-15 Device, method and program for processing image, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006166453A JP2007334675A (en) 2006-06-15 2006-06-15 Device, method and program for processing image, and recording medium

Publications (1)

Publication Number Publication Date
JP2007334675A true JP2007334675A (en) 2007-12-27

Family

ID=38934093

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006166453A Pending JP2007334675A (en) 2006-06-15 2006-06-15 Device, method and program for processing image, and recording medium

Country Status (1)

Country Link
JP (1) JP2007334675A (en)

Similar Documents

Publication Publication Date Title
US9916518B2 (en) Image processing apparatus, image processing method, program and imaging apparatus
US8774507B2 (en) Image processing device and image processing method to calculate a color correction condition
JP5089405B2 (en) Image processing apparatus, image processing method, and imaging apparatus
US7652717B2 (en) White balance correction in digital camera images
US7916905B2 (en) System and method for image facial area detection employing skin tones
US20070071316A1 (en) Image correcting method and image correcting system
US7630020B2 (en) Image processing apparatus and its method
JP2011511358A (en) Automatic red eye detection
US8467085B2 (en) Image processing apparatus, data amount reducing method, and data amount reducing program embodied on computer readable medium
US8249321B2 (en) Image processing apparatus and method for red eye detection
US20120013642A1 (en) Image processing apparatus, image processing method, and recording medium
CN110855958A (en) Image adjusting method and device, electronic equipment and storage medium
US20110026818A1 (en) System and method for correction of backlit face images
US7768674B2 (en) Exposure determining device and exposure determining method
US10360446B2 (en) Data processing apparatus, storage medium storing program, and data processing method
JP2008061209A (en) Image processing method
JP4920814B2 (en) Image processing method, apparatus, and recording medium
US7689065B2 (en) Image processing method and apparatus for suppressing positional shift image degradation
US7542074B2 (en) Photographed image projection device which sets a frame frequency of photographing by a camera based on movement in a photographed image
JP2006004124A (en) Picture correction apparatus and method, and picture correction program
JP2007334675A (en) Device, method and program for processing image, and recording medium
JP2007174015A (en) Image management program and image management apparatus
JP2006246127A (en) Image reproducing method apparatus, and program
JP2011139162A (en) Image encoding device, control method, and program
JP5124312B2 (en) Image processing program, image processing method, and electronic camera