JP2007025901A - Image processor and image processing method - Google Patents
Image processor and image processing method Download PDFInfo
- Publication number
- JP2007025901A JP2007025901A JP2005204737A JP2005204737A JP2007025901A JP 2007025901 A JP2007025901 A JP 2007025901A JP 2005204737 A JP2005204737 A JP 2005204737A JP 2005204737 A JP2005204737 A JP 2005204737A JP 2007025901 A JP2007025901 A JP 2007025901A
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- image
- pixel
- luminance
- luminance value
- 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.)
- Withdrawn
Links
- 238000003672 processing method Methods 0.000 title claims description 6
- 238000000034 method Methods 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims description 30
- 238000012937 correction Methods 0.000 claims description 20
- 238000000605 extraction Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000011946 reduction process Methods 0.000 claims description 2
- 239000000284 extract Substances 0.000 abstract description 4
- 238000005286 illumination Methods 0.000 abstract description 3
- 238000003384 imaging method Methods 0.000 abstract description 2
- 230000001815 facial effect Effects 0.000 abstract 2
- 238000012795 verification Methods 0.000 description 25
- 230000006870 function Effects 0.000 description 13
- 238000013528 artificial neural network Methods 0.000 description 11
- 238000001514 detection method Methods 0.000 description 9
- 210000002569 neuron Anatomy 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 210000000887 face Anatomy 0.000 description 4
- 238000009499 grossing Methods 0.000 description 3
- KNMAVSAGTYIFJF-UHFFFAOYSA-N 1-[2-[(2-hydroxy-3-phenoxypropyl)amino]ethylamino]-3-phenoxypropan-2-ol;dihydrochloride Chemical compound Cl.Cl.C=1C=CC=CC=1OCC(O)CNCCNCC(O)COC1=CC=CC=C1 KNMAVSAGTYIFJF-UHFFFAOYSA-N 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 241000405217 Viola <butterfly> Species 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
Images
Abstract
Description
本発明は、画像中における被写体を検出するための技術に関するものである。 The present invention relates to a technique for detecting a subject in an image.
画像から特定の被写体パターンを自動的に検出する画像処理方法は非常に有用であり、例えば人間の顔の判定に利用することができる。このような方法は、通信会議、マン・マシン・インタフェース、セキュリティ、人間の顔を追跡するためのモニタ・システム、画像圧縮などの多くの分野で使用することができる。このような画像中から顔を検出する技術としては、例えば、非特許文献1に各種方式が挙げられている。その中では、いくつかの顕著な特徴(2つの目、口、鼻など)とその特徴間の固有の幾何学的位置関係とを利用するか、又は人間の顔の対称的特徴、人間の顔色の特徴、テンプレート・マッチング、ニューラル・ネットワークなどを利用することによって、人間の顔を検出する方式が示されている。 An image processing method for automatically detecting a specific subject pattern from an image is very useful, and can be used for, for example, determination of a human face. Such methods can be used in many areas such as teleconferencing, man-machine interfaces, security, monitor systems for tracking human faces, image compression, and the like. As a technique for detecting a face from such an image, for example, Non-Patent Document 1 discloses various methods. Among them, use some prominent features (two eyes, mouth, nose, etc.) and the unique geometric positional relationship between those features, or symmetric features of human face, human face color A method for detecting a human face by using features, template matching, neural network, etc. is shown.
一方、非特許文献2で提案されている方式は、ニューラル・ネットワークにより画像中の顔パターンを検出する方法である。以下、非特許文献2による顔検出の方法について簡単に説明する。 On the other hand, the method proposed in Non-Patent Document 2 is a method of detecting a face pattern in an image using a neural network. The face detection method according to Non-Patent Document 2 will be briefly described below.
まず、顔を含む画像データをメモリに読み込み、顔と照合する所定の領域を画像中から切り出す。そして、切り出した領域の画素値の分布を入力としてニューラル・ネットワークによる演算で一つの出力を得る。このとき、ニューラル・ネットワークの重み、閾値が膨大な顔画像パターンと非顔画像パターンによりあらかじめ学習されており、例えば、ニューラル・ネットワークの出力が0以上なら顔、それ以外は非顔であると判別する。 First, image data including a face is read into a memory, and a predetermined area to be compared with the face is cut out from the image. Then, one output is obtained by calculation using a neural network with the distribution of pixel values in the cut out region as an input. At this time, the weight and threshold of the neural network are learned in advance using a face image pattern and a non-face image pattern, and for example, a face is determined if the output of the neural network is 0 or more, and a non-face is determined otherwise. To do.
そして、ニューラル・ネットワークの入力である顔と照合する画像パターンの切り出し位置を、例えば、図3に示すように画像全域から縦横順次に走査していくことにより、画像中から顔を検出する。また、様々な大きさの顔の検出に対応するため、図3に示すように読み込んだ画像を所定の割合で順次縮小し、それに対して前述した顔検出の走査を行うようにしている。 Then, the face is detected from the image by scanning the cutout position of the image pattern to be collated with the face which is an input of the neural network, for example, vertically and horizontally from the entire image as shown in FIG. Further, in order to cope with the detection of faces of various sizes, as shown in FIG. 3, the read images are sequentially reduced at a predetermined rate, and the above-described face detection scanning is performed on the images.
また、切り出した部分領域が顔かどうかを判定する際に、特に画像撮影時の照明条件など被写体の環境によって顔が暗かったり、部分的に陰が顔にかかってしまったりした場合には、切り出した領域の画素値の分布が大幅に変わってしまうので、著しく性能が劣化してしまう。 In addition, when determining whether a cut-out partial area is a face or not, if the face is dark due to the subject environment such as lighting conditions at the time of image capture, or if the shadow is partially covered by the face, Since the distribution of the pixel values in the region is greatly changed, the performance is remarkably deteriorated.
このような状況に対処するために、非特許文献2では、切り出した部分領域に対して画素値の線形補正とヒストグラム平滑化による補正を前処理として行っている。画素値の線形補正とは、切り出した部分領域の画素値の分布を一次平面で近似し、その一次成分を元の画素値の分布から減算することで直線的な画素値の変化を補正するものである。また、ヒストグラム平滑化は切り出した部分領域の画素値の分布(ヒストグラム)が一様になるように画素値の変換を行い、コントラストを強調する当業者には良く知られた画像処理方法である。 In order to deal with such a situation, in Non-Patent Document 2, linear correction of pixel values and correction by histogram smoothing are performed as preprocessing for the cut out partial area. Linear correction of pixel values is to correct the change in linear pixel values by approximating the distribution of pixel values in the cut out partial area on the primary plane and subtracting the primary component from the original distribution of pixel values. It is. Histogram smoothing is an image processing method well known to those skilled in the art that enhances contrast by converting pixel values so that the distribution (histogram) of pixel values in the extracted partial region is uniform.
しかしながら、画素値の線形補正では、顔の部分に影響を与える照明条件が大局的に変化する場合にはある程度対処できるが、例えば、被写体が帽子をかぶっていたり、木陰に立っていたりするような顔に対して部分的に陰がかかっているような状況では対処できず、被写体パターンの検出精度を劣化させるという問題点があった。
本発明は以上の問題に鑑みて成されたものであり、被写体の撮影を行う際の撮影環境、特に照明条件によって被写体が暗かったり、被写体に対して部分的に陰がかかってしまったりする場合においても精度よく被写体を検出するための技術を提供することを目的とする。 The present invention has been made in view of the above problems, and when the subject is photographed, particularly when the subject is dark or partially shaded depending on the illumination conditions. It is an object of the present invention to provide a technique for accurately detecting a subject.
本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。 In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.
即ち、所定の被写体を含む画像を取得する取得手段と、
前記画像の輝度成分で構成される輝度画像を生成する生成手段と、
前記輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する縮小手段と、
前記縮小画像上の各位置に所定サイズの矩形を配置した場合に、当該矩形内のパターンを構成するそれぞれの画素の輝度値を抽出する抽出する第1の抽出手段と、
前記それぞれの画素の低周波成分を求める計算手段と、
前記それぞれの画素の輝度値を、前記それぞれの画素の低周波成分を用いて補正する補正手段と、
前記補正手段によって輝度値が補正されたパターンが顔のパターンであるかを判別する判別手段と、
前記判別手段によって顔のパターンと判別されたパターンを出力する出力手段と
を備えることを特徴とする。
That is, acquisition means for acquiring an image including a predetermined subject;
Generating means for generating a luminance image composed of luminance components of the image;
Reduction means for generating a plurality of reduced images by recursively reducing the luminance image;
A first extracting means for extracting, when a rectangle of a predetermined size is arranged at each position on the reduced image, extracting a luminance value of each pixel constituting the pattern in the rectangle;
Calculating means for obtaining a low-frequency component of each pixel;
Correction means for correcting the luminance value of each of the pixels using a low-frequency component of each of the pixels;
Determining means for determining whether the pattern whose luminance value has been corrected by the correcting means is a face pattern;
Output means for outputting a pattern determined as a face pattern by the determining means.
本発明の目的を達成するために、例えば、本発明の画像処理方法は以下の構成を備える。 In order to achieve the object of the present invention, for example, an image processing method of the present invention comprises the following arrangement.
即ち、所定の被写体を含む画像を取得する取得工程と、
前記画像の輝度成分で構成される輝度画像を生成する生成工程と、
前記輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する縮小工程と、
前記縮小画像上の各位置に所定サイズの矩形を配置した場合に、当該矩形内のパターンを構成するそれぞれの画素の輝度値を抽出する抽出する第1の抽出工程と、
前記それぞれの画素の低周波成分を求める計算工程と、
前記それぞれの画素の輝度値を、前記それぞれの画素の低周波成分を用いて補正する補正工程と、
前記補正工程で輝度値が補正されたパターンが顔のパターンであるかを判別する判別工程と、
前記判別工程で顔のパターンと判別されたパターンを出力する出力工程と
を備えることを特徴とする。
That is, an acquisition step of acquiring an image including a predetermined subject;
A generation step of generating a luminance image composed of luminance components of the image;
A reduction process for generating a plurality of reduced images by recursively reducing the luminance image;
A first extraction step of extracting, when a rectangle of a predetermined size is arranged at each position on the reduced image, extracting a luminance value of each pixel constituting the pattern in the rectangle;
A calculation step for obtaining a low frequency component of each of the pixels;
A correction step of correcting the luminance value of each of the pixels using a low frequency component of each of the pixels;
A determination step of determining whether the pattern whose luminance value has been corrected in the correction step is a face pattern;
An output step of outputting the pattern determined as the face pattern in the determination step.
本発明の構成により、被写体の撮影を行う際の撮影環境、特に照明条件によって被写体が暗かったり、被写体に対して部分的に陰がかかってしまったりする場合においても精度よく被写体を検出することができる。 According to the configuration of the present invention, it is possible to detect a subject with high accuracy even when the subject is dark or is partially shaded depending on the photographing environment for photographing the subject, particularly lighting conditions. it can.
以下添付図面を参照して、本発明を好適な実施形態に従って詳細に説明する。 Hereinafter, the present invention will be described in detail according to preferred embodiments with reference to the accompanying drawings.
本実施形態に係る画像処理装置は、PC(パーソナルコンピュータ)やWS(ワークステーション)等のコンピュータにより構成されており、ディジタルカメラなどの撮像装置から入力した画像、インターネットなどのネットワークを介して外部機器からダウンロードした画像、CD−ROMやDVD−ROMなどの記憶媒体からの読み出しにより入力した画像など、様々な入力形態で入力した画像中に含まれている所定の被写体を検出する。なお、本実施形態では被写体として人間の顔を用いるが、その他の被写体を用いても良い。 The image processing apparatus according to the present embodiment is configured by a computer such as a PC (personal computer) or WS (workstation), and an external device via an image input from an imaging apparatus such as a digital camera or a network such as the Internet. A predetermined subject included in an image input in various input forms such as an image downloaded from, an image input by reading from a storage medium such as a CD-ROM or a DVD-ROM is detected. In this embodiment, a human face is used as a subject, but other subjects may be used.
先ず、このような処理を行う本実施形態に係る画像処理装置について説明する。図7は、本実施形態に係る画像処理装置に適用可能なコンピュータのハードウェア構成を示す図である。 First, an image processing apparatus according to the present embodiment that performs such processing will be described. FIG. 7 is a diagram illustrating a hardware configuration of a computer applicable to the image processing apparatus according to the present embodiment.
201はCPUで、RAM202やROM203に格納されているプログラムやデータを用いてコンピュータ全体の制御を行うと共に、コンピュータが行う後述の各処理を実行する。
A
202はRAMで、外部記憶装置207や記憶媒体ドライブ装置208から読み出したプログラムやデータを一時的に記憶するためのエリア、I/F209を介して外部から受信したデータを一時的に記憶する為のエリア、CPU201が各種の処理を実行する為に用いるワークエリア等、各種のエリアを適宜提供することができる。
203はROMで、ここにブートプログラムや本コンピュータの設定データなどを格納する。
A
204、205は夫々キーボード、マウスで、コンピュータの操作者が操作することで各種の指示をCPU201に対して入力することができる。
206は表示部で、CRTや液晶画面などにより構成されており、CPU201による処理結果を文字や画像等でもって表示する。
A
207は外部記憶装置で、ハードディスクドライブ装置等の大容量情報記憶装置であって、ここにOS(オペレーティングシステム)や、コンピュータが行う後述の各処理をCPU201に実行させるためのプログラムやデータが格納されており、これらはCPU201による制御に従って適宜RAM202に読み出される。
208は記憶媒体ドライブ装置で、CD−ROMやDVD−ROMなどの記憶媒体に記録されているプログラムやデータを読み出して、RAM202や外部記憶装置207等に出力する。なお、上記外部記憶装置207に記憶されているプログラムやデータの一部を上記記憶媒体に記録しておいても良く、その場合には、これら記憶されているプログラムやデータを使用する際に、記憶媒体ドライブ装置208がこの記憶媒体に記録されているプログラムやデータを読み出して、RAM202に出力する。
A storage
209はI/F(インターフェース)で、ここにディジタルカメラやインターネットやLANのネットワーク回線等を接続することができる。
210は上述の各部を繋ぐバスである。
A
なお、コンピュータへの画像の入力形態については特に限定するものではなく、様々な形態が考えられる。 In addition, the input form of the image to the computer is not particularly limited, and various forms are conceivable.
図1は、本実施形態に係る画像処理装置に適用可能なコンピュータの機能構成を示すブロック図である。同図に示す如く、本実施形態に係る画像処理装置は、画像入力部10、画像メモリ20、画像縮小部30、照合パターン抽出部40、低周波成分抽出部50、輝度補正部60、顔判別部70、顔領域出力部80により構成されている。
FIG. 1 is a block diagram showing a functional configuration of a computer applicable to the image processing apparatus according to the present embodiment. As shown in the figure, the image processing apparatus according to this embodiment includes an
画像入力部10は、例えばディジタルスチルカメラ、フィルムスキャナーなどの装置から出力された画像データを受け、後段の画像メモリ20に出力するものである。なお、上述の通り、画像の入力形態については特に限定するものではない。
The
画像メモリ20は、画像入力部10から出力される画像データを格納するためのメモリである。
The
画像縮小部30は、先ず、画像メモリ20から受けた画像データの輝度成分で構成される輝度画像を生成する。そして、生成した輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する。生成したそれぞれの縮小画像(画像メモリ20から受けた画像データに基づいて生成したオリジナルの輝度画像も1/1の縮小画像と解釈すれば、このオリジナルもまた、縮小画像に含めることができる)は順次後段の照合パターン抽出部40に出力する。
The
照合パターン抽出部40は、画像縮小部30から縮小画像を受けると、この縮小画像上で所定サイズの矩形を移動させながら、この矩形に含まれる画素群を「照合対象パターン」として順次抽出し、後段の低周波成分抽出部50、及び輝度補正部60に出力する。このような処理は、画像縮小部20から受けたそれぞれの縮小画像について行う。
When the collation
低周波成分抽出部50は、照合パターン抽出部40から照合対象パターンを受けると、この照合対象パターンを構成する各画素の低周波成分を抽出する。抽出した低周波成分のデータは後段の輝度補正部60に出力する。
When receiving the verification target pattern from the verification
輝度補正部60は、照合パターン抽出部40から照合対象パターン、低周波成分抽出部50からこの照合対象パターンの低周波成分を受けると、この低周波成分を用いて、この照合対象パターンの輝度分布を補正する処理を行う。
When the
顔判別部70は、輝度補正部60が輝度分布を補正した照合対象パターンが顔のパターンであるのか否かを判別する。
The
顔領域出力部70は、顔判別部70が顔のパターンであると判別した照合対象パターンを出力する。
The face
以上の各部は、例えば、CPU201の一機能として動作するものである。
Each of the above units operates as one function of the
次に、CPU201が図1に示した各部として動作することでなされる処理、即ち、画像中に含まれている被写体を検出するための処理について、同処理のフローチャートを示す図2を用いて以下説明する。なお、同図のフローチャートに従った処理をCPU201に実行させるためのプログラムやデータは外部記憶装置207(もしくは記憶媒体ドライブ装置208が読み取り可能な記憶媒体)に保存されており、これをCPU201の制御に従って適宜RAM202にロードし、CPU201がこれを用いて処理を実行することで、コンピュータは以下説明する各処理を実行することになる。
Next, a process performed by the
外部記憶装置207や、I/F209を介して外部から画像データが入力されると、CPU201は、これをRAM202内の上記画像メモリ20に相当するエリアに一時的に格納する(ステップS101)。なお、本コンピュータに入力した画像が圧縮されている場合には、これを伸張してからRAM202に一時的に格納する。
When image data is input from the outside via the
本実施形態では、入力された画像データを構成する各画素は、R、G、Bで表現されるものであるとする。従って、CPU201は、ステップS101でRAM202に格納した画像データに基づいて、この画像の輝度成分で構成される画像(輝度画像)、即ち、この画像を構成する各画素の値をこの画素の輝度値に変換した画像を生成する(ステップS102)。しかし、ステップS101でRAM202に格納した画像データを構成する各画素がYCrCbで表現されるものである場合には、ステップS102では、Y成分のみを用いて輝度画像を生成する。
In the present embodiment, it is assumed that each pixel constituting the input image data is represented by R, G, and B. Accordingly, the
次に、CPU201は、生成した輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する(ステップS103)。例えば、ステップS102で生成した輝度画像(以下の説明上、縮小画像1と呼称する)の縦横のサイズを1/1.2倍した縮小画像2を生成し、次に縮小画像2の縦横のサイズを1/1.2倍した縮小画像3を生成する、というように、複数枚の縮小画像を生成する。これは、以後の処理で顔を抽出する際に様々な大きさの顔の検出に対応するため複数のサイズの画像データに対して順次検出を行うようにしたためである。なお、生成する縮小画像の枚数については特に限定するものではない。
Next, the
そして、ステップS104以降では、生成したそれぞれの縮小画像について処理を行う。即ち、ステップS104以降の処理は、生成した縮小画像の数だけ繰り返し行うことになる。 In step S104 and subsequent steps, each generated reduced image is processed. That is, the processing after step S104 is repeatedly performed for the number of generated reduced images.
以降の説明では、生成した縮小画像はサイズの大きい順に縮小画像1、縮小画像2、、、、縮小画像Mと呼称するものとし、先ず、縮小画像1について以降の処理を行うものとする。なお、処理の対象として選択する順番については特に限定するものではない。 In the following description, the generated reduced images are referred to as reduced image 1, reduced image 2,... Reduced image M in descending order of size, and the subsequent processing is performed on reduced image 1 first. Note that the order of selection as processing targets is not particularly limited.
先ず、CPU201は、縮小画像1上に所定サイズの矩形を配置し、矩形内の画素群を照合対象パターンとして抽出する(ステップS104)。この矩形は、縮小画像1上の各位置に配置した場合に、それぞれの位置における矩形内の輝度分布を得るためのものであるので、例えばこの矩形は最初は画像の左上隅に配置する。
First, the
次に、ステップS104で抽出した照合対象パターンを構成する各画素の低周波成分を求める(ステップS105)。ステップS105における処理については様々なものが考えられるが、以下にその一例を示す。 Next, a low frequency component of each pixel constituting the verification target pattern extracted in step S104 is obtained (step S105). Various processes can be considered in step S105, and an example is shown below.
例えば、照合対象パターンを構成する画素i(i=1,,,N)の低周波成分を求める場合、照合対象パターン上でこの画素iの位置を中心とする所定サイズのブロックを設定し、このブロック内の各画素の輝度値の平均値を求め、この平均値を画素iの低周波成分とする。 For example, when obtaining a low frequency component of a pixel i (i = 1,..., N) constituting the verification target pattern, a block having a predetermined size centered on the position of the pixel i is set on the verification target pattern. An average value of luminance values of each pixel in the block is obtained, and this average value is set as a low frequency component of the pixel i.
ここで、このブロックについては図6に示すように、照合対象パターンが検出対象の顔をほぼカバーする領域Fである場合、目や鼻をほぼカバーする程度の大きさの領域Pであることがより好ましい。これは、照明条件や周囲の環境により、目や鼻などくぼみ、突起のある部分が関係して顔に部分的な陰ができる頻度が高く、そのような状況に対処するように低周波成分を抽出することがより好ましいからである。例えば、照合対象パターンのサイズが20画素×20画素程度である場合には、ブロックのサイズは5×5画素〜9×9画素程度であることが好ましい。なお、ブロック内の平均輝度値を算出する際、照合対象パターンの周辺領域では部分的なブロックしか設定できないので、その場合には、設定可能な部分のブロック内の輝度値を用いて平均輝度値を求めるようにする。また、低周波成分を抽出する具体的な方法として本実施形態ではブロック内の平均輝度値を求めるようにしたが、ブロック内の輝度分布とガウシアン関数との積和演算を行うことで、ブロック内の輝度分布を得るようにしても良い。 Here, as shown in FIG. 6, when the verification target pattern is a region F that substantially covers the face to be detected, this block may be a region P that is large enough to cover the eyes and nose. More preferred. This is due to the high frequency of partial shadows on the face due to depressions and protrusions in the eyes and nose depending on the lighting conditions and the surrounding environment, and low frequency components are used to deal with such situations. It is because it is more preferable to extract. For example, when the size of the verification target pattern is about 20 pixels × 20 pixels, the block size is preferably about 5 × 5 pixels to 9 × 9 pixels. Note that when calculating the average luminance value in a block, only a partial block can be set in the peripheral area of the pattern to be matched. In this case, the average luminance value is calculated using the luminance value in the block of the settable portion. To ask. In this embodiment, the average luminance value in the block is obtained as a specific method for extracting the low frequency component. However, by performing a product-sum operation on the luminance distribution in the block and the Gaussian function, May be obtained.
従って、i=1〜Nについてこのような処理を行うことにより、照合対象パターンを構成するそれぞれの画素の低周波成分(換言すれば照合対象パターンの輝度分布)を求めることができる。尚、処理の高速を優先する場合には、ある画素のまとまり(例えば2画素×2画素)毎にブロックを設定し、そのブロック内の画素の平均輝度値を、このまとまった画素に対する低周波成分としても良い。 Therefore, by performing such processing for i = 1 to N, it is possible to obtain the low-frequency component (in other words, the luminance distribution of the verification target pattern) of each pixel constituting the verification target pattern. When priority is given to high-speed processing, a block is set for each group of pixels (for example, 2 pixels × 2 pixels), and the average luminance value of the pixels in the block is set to a low-frequency component for the grouped pixels. It is also good.
次に、CPU201は、ステップS104で抽出した照合対象パターンを構成する各画素の輝度値を、それぞれの画素についてステップS105で求めた低周波成分でもって補正する処理を行う(ステップS106)。
Next, the
即ち、照合対象パターンを構成する画素i(i=1,,,N)の輝度値をYi、画素iの低周波成分をLiとすると、この画素iの補正後の輝度値Y’iは以下の式に従って求めることができる。 That is, if the luminance value of the pixel i (i = 1,, N) constituting the verification target pattern is Yi and the low frequency component of the pixel i is Li, the corrected luminance value Y′i of the pixel i is as follows: It can obtain | require according to the formula of.
Y’i=Yi/Li
なお、ここでY’i、Yi、Liは0以上1以下の値に正規化されているものとし、Liが0の場合はY’iとして0を出力する。また、Y’iが1を越えた場合はY’iとして1を出力する。また、所定のパラメータγを用いて、以下の式に従ってY’iを求めるようにしても良い。
Y'i = Yi / Li
Here, Y′i, Yi, and Li are normalized to a value of 0 or more and 1 or less, and when Li is 0, 0 is output as Y′i. When Y′i exceeds 1, 1 is output as Y′i. Alternatively, Y′i may be obtained according to the following equation using a predetermined parameter γ.
Y’i=Yi/Liγ
上記何れかの式でもって輝度値を補正することにより、補正しようとする画素の輝度値は、この画素の周辺の輝度が明るい場合はあまり輝度値が変化しないが、この画素の周辺の輝度が暗い場合は輝度が明るくなるように補正されるので、画像中で部分的に暗い箇所を構成する各画素の輝度値を、周辺の輝度値を鑑みて補正することができる。
Y′i = Yi / Li γ
By correcting the luminance value by any of the above formulas, the luminance value of the pixel to be corrected does not change much when the luminance around this pixel is bright, but the luminance around this pixel does not change. In the case of darkness, the brightness is corrected so as to be bright, so that the brightness value of each pixel constituting a partially dark portion in the image can be corrected in view of surrounding brightness values.
なお、本実施形態では、低周波成分に基づく輝度補正について説明したが、上記非特許文献2で提案されているヒストグラム平滑化処理と組み合わせてもよいことは言うまでもない。 In the present embodiment, the luminance correction based on the low frequency component has been described, but it goes without saying that it may be combined with the histogram smoothing process proposed in Non-Patent Document 2.
従って、上記何れかの式を用いて、Y’iをi=1〜Nについて求めることで、ステップS104で抽出した照合対象パターンを構成する各画素の輝度値を補正することができる。ステップS104で抽出した照合対象パターンを構成する各画素の輝度値を補正したものはY’iのデータとして得られる。 Therefore, by obtaining Y′i for i = 1 to N using any one of the above equations, the luminance value of each pixel constituting the verification target pattern extracted in step S104 can be corrected. What corrected the luminance value of each pixel which comprises the collation target pattern extracted by step S104 is obtained as Y'i data.
次に、顔判別部70は、ステップS106で輝度分布が補正された照合対象パターン(輝度パターン)が、顔パターン(顔とおぼしきパターン)であるかを判別する(ステップS107)。
Next, the
図4は、所定領域内のパターンを識別する為のニューラルネットワークの動作について示した図である。同図においてRは、例えば画像上で識別する領域を示すものであり、本実施形態ではこの領域Rを同図に示す如く、3種類の方法にてさらに領域分割し、各ニューロン(Nで示す)への受容野とする。そして、分割された領域の輝度分布を各ニューロンに入力し、中間層での出力が得られる。そして、各ニューロンの出力を出力層のニューロンの入力として最終出力が得られる。 FIG. 4 is a diagram showing the operation of the neural network for identifying the pattern in the predetermined area. In the figure, R represents an area to be identified on the image, for example. In this embodiment, as shown in the figure, this area R is further divided into three areas by each of the neurons (indicated by N). ) As a receptive field. Then, the luminance distribution of the divided area is input to each neuron, and an output in the intermediate layer is obtained. Then, the final output is obtained by using the output of each neuron as the input of the neuron in the output layer.
ここで、各ニューロンでは予め学習によって得られた重みと輝度分布との積和演算およびその結果のシグモイド関数による演算が行われる。本実施形態では、出力層のニューロンの出力値と所定の閾値との比較を行い、閾値を越える出力のパターンを顔、それ以外を顔でない(非顔)とした(ニューラル・ネットワークの詳細および学習の方法については、上記非特許文献2を参照されたい)。 Here, in each neuron, the product-sum operation of the weight and the luminance distribution obtained by learning in advance and the operation by the sigmoid function as a result are performed. In this embodiment, the output value of the neuron in the output layer is compared with a predetermined threshold value, and an output pattern exceeding the threshold value is set as a face and the other pattern is not a face (non-face) (details and learning of neural network) (Refer to the above-mentioned Non-Patent Document 2).
なお、ステップS106で輝度分布が補正された照合対象パターンが顔パターンであるかを判別する処理についてはこれに限定するものではなく、所定の入力パターンに対して被写体の判別を行い、顔パターンと非顔パターンとの判別が可能な値を出力するようなものであればよい。例えば、入力である部分領域を図5に示す如く顔の輪郭、眼、鼻、口、頬の位置関係にもとづいて分割するように受容野を設定してもよい。図5は、顔の各部分を示す図である。 Note that the process of determining whether the pattern to be verified whose luminance distribution has been corrected in step S106 is a face pattern is not limited to this. The subject is determined for a predetermined input pattern, and the face pattern and Any device that outputs a value that can be distinguished from a non-face pattern may be used. For example, the receptive field may be set so as to divide the input partial area based on the positional relationship of the face outline, eyes, nose, mouth, and cheeks as shown in FIG. FIG. 5 shows each part of the face.
また、ニューラル・ネットワークによる判別に限らず、例えば、Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2001に”Rapid Object Detection using a Boosted Cascade of Simple Features”と題するViolaとJonesによる報告で提案されているAdaBoostによる方式を用いてもよい。 In addition, it is not limited to neural network discrimination. For example, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2001 was proposed in a report by Viola and Jones entitled “Rapid Object Detection using a Boosted Cascade of Simple Features”. A method based on AdaBoost may be used.
図3は、様々なサイズの縮小画像(本実施形態の場合には縮小画像1、縮小画像2、、、、縮小画像M)について、照合対象パターンが顔パターンであるかを判別する処理を説明する図である。それぞれの縮小画像上の各位置に同じサイズの矩形を配置した場合に、それぞれの位置における矩形内の領域が顔パターンであるのか否かを判断するために、先ず、同図左側に示す如く、縮小画像の左上隅に矩形を配置し、そこから右側に、上から下に向かって矩形の位置を移動させる。移動させる毎に矩形内の画素群は照合対象パターンとして顔パターンの判別に用いられる。 FIG. 3 illustrates a process for determining whether a verification target pattern is a face pattern for reduced images of various sizes (reduced image 1, reduced image 2,... Reduced image M in this embodiment). It is a figure to do. When a rectangle of the same size is arranged at each position on each reduced image, in order to determine whether or not the area within the rectangle at each position is a face pattern, first, as shown on the left side of FIG. A rectangle is arranged at the upper left corner of the reduced image, and the position of the rectangle is moved from top to bottom from the right to the right. Each time the pixel group is moved, the pixel group in the rectangle is used as a collation target pattern for discrimination of the face pattern.
そして、ステップS107において、ステップS106で輝度値が補正された照合対象パターンが顔のパターンであると判別された場合には処理をステップS108に進め、この照合対象パターンの画像データを出力する(ステップS108)。なお、出力する照合対象パターンについては、ステップS106における補正前のものであっても良いし、補正後のものであっても良い。 If it is determined in step S107 that the verification target pattern whose luminance value has been corrected in step S106 is a face pattern, the process proceeds to step S108, and image data of the verification target pattern is output (step S108). S108). The collation target pattern to be output may be a pattern before correction in step S106 or a pattern after correction.
また、出力先については特に限定するものではないが、RAM202内の所定のエリアであっても良いし、外部記憶装置207やI/F209を介してデータ通信可能な外部の装置であっても良い。
The output destination is not particularly limited, but may be a predetermined area in the
一方、ステップS107において、ステップS106で輝度値が補正された照合対象パターンが顔のパターンではないと判別された場合、若しくはステップS108における処理の後には処理をステップS114に進め、CPU201は、縮小画像1上における矩形の移動先があるのかをチェックする(ステップS114)。即ち、縮小画像1上における矩形の位置を移動させ、次の位置における矩形内の画素群を照合対象パターンとして抽出する処理を行う場合に、移動先が無い場合、例えば、現在の矩形の位置が既に縮小画像1の右下隅の位置であれば、もう矩形の移動は行えない。一方、現在の矩形の位置が既に縮小画像1の右下隅の位置でなければ、矩形の移動を行うことができる。 On the other hand, if it is determined in step S107 that the verification target pattern whose luminance value has been corrected in step S106 is not a face pattern, or after the process in step S108, the process proceeds to step S114. It is checked whether or not there is a rectangular destination on 1 (step S114). That is, when the position of the rectangle on the reduced image 1 is moved and the pixel group in the rectangle at the next position is extracted as a verification target pattern, and there is no destination, for example, the current rectangle position is If the position is already at the lower right corner of the reduced image 1, the rectangle cannot be moved anymore. On the other hand, if the position of the current rectangle is not already the position of the lower right corner of the reduced image 1, the rectangle can be moved.
従って、移動先がある場合には処理をステップS114からステップS115に進め、縮小画像1上における矩形の位置を移動させる(ステップS115)。そして矩形の移動が完了すると、処理をステップS104に進め、移動後の矩形内における照合対象パターンを抽出し、以降の処理を行う。 Accordingly, if there is a destination, the process proceeds from step S114 to step S115, and the position of the rectangle on the reduced image 1 is moved (step S115). When the movement of the rectangle is completed, the process proceeds to step S104, the pattern to be collated in the moved rectangle is extracted, and the subsequent processes are performed.
一方、矩形の移動先がない場合には、処理をステップS116に進め、全ての縮小画像について以上の処理を行ったのかを判断し(ステップS116)、まだ処理対象となっていない縮小画像がある場合には処理をステップS117に進め、縮小画像上に配置する矩形の位置を初期化(例えば縮小画像の左上隅の位置に戻す)し(ステップS117)、次の縮小画像についてステップS104以降の処理を行う。 On the other hand, if there is no rectangular movement destination, the process proceeds to step S116 to determine whether or not all the reduced images have been processed (step S116), and there is a reduced image that has not yet been processed. In this case, the process proceeds to step S117, the position of the rectangle to be arranged on the reduced image is initialized (for example, returned to the position of the upper left corner of the reduced image) (step S117), and the process after step S104 is performed for the next reduced image. I do.
本実施形態では現在縮小画像1について処理を行ったので、次は縮小画像2について処理を行う。よってこの場合には、縮小画像2上の左上隅の位置に矩形を配置し(ステップS117)、この縮小画像2についてステップS104以降の処理を行う。 In the present embodiment, since processing is currently performed on the reduced image 1, processing is performed on the reduced image 2 next. Therefore, in this case, a rectangle is arranged at the position of the upper left corner on the reduced image 2 (step S117), and the processing after step S104 is performed on the reduced image 2.
よって、以上のように、異なる縮小率の縮小画像のそれぞれについて、同じサイズの照合対象パターンを抽出し、抽出した照合対象パターンを用いて顔の検出処理を行うことで、顔が画像中にどのような比率で占めていようとも、画像中における顔を検出することができる。例えば縮小率の高い縮小画像のサイズは限りなく照合対象パターンのサイズに近づくので、例え画像中に大きく顔が占めているような場合であっても、この顔は照合対象パターン内に収まる可能性が高く、この顔を検出する可能性は高い。 Therefore, as described above, for each of the reduced images having different reduction ratios, a matching target pattern of the same size is extracted, and the face detection process is performed using the extracted matching target pattern. Even if it occupies such a ratio, the face in the image can be detected. For example, the size of a reduced image with a high reduction ratio is as close as possible to the size of the pattern to be collated, so even if the face occupies a large face in the image, this face may fit in the pattern to be collated The probability of detecting this face is high.
以上の説明により、本実施形態によって、照明条件など被写体の撮影環境が悪い状況においても画像中から精度よく顔領域を抽出することができる。 As described above, according to the present embodiment, it is possible to accurately extract a face region from an image even in a situation where the shooting environment of a subject is bad such as illumination conditions.
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。 Also, an object of the present invention is to supply a recording medium (or storage medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or Needless to say, this can also be achieved when the MPU) reads and executes the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Furthermore, after the program code read from the recording medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。 When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.
Claims (8)
前記画像の輝度成分で構成される輝度画像を生成する生成手段と、
前記輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する縮小手段と、
前記縮小画像上の各位置に所定サイズの矩形を配置した場合に、当該矩形内のパターンを構成するそれぞれの画素の輝度値を抽出する抽出する第1の抽出手段と、
前記それぞれの画素の低周波成分を求める計算手段と、
前記それぞれの画素の輝度値を、前記それぞれの画素の低周波成分を用いて補正する補正手段と、
前記補正手段によって輝度値が補正されたパターンが顔のパターンであるかを判別する判別手段と、
前記判別手段によって顔のパターンと判別されたパターンを出力する出力手段と
を備えることを特徴とする画像処理装置。 Acquisition means for acquiring an image including a predetermined subject;
Generating means for generating a luminance image composed of luminance components of the image;
Reduction means for generating a plurality of reduced images by recursively reducing the luminance image;
A first extracting means for extracting, when a rectangle of a predetermined size is arranged at each position on the reduced image, extracting a luminance value of each pixel constituting the pattern in the rectangle;
Calculating means for obtaining a low-frequency component of each pixel;
Correction means for correcting the luminance value of each of the pixels using a low-frequency component of each of the pixels;
Determining means for determining whether the pattern whose luminance value has been corrected by the correcting means is a face pattern;
An image processing apparatus comprising: output means for outputting a pattern determined as a face pattern by the determination means.
に従って求める処理をi=1〜Nについて行うことを特徴とする請求項1に記載の画像処理装置。 When the luminance value of the pixel i (i = 1,, N) constituting the pattern is Yi and the low frequency component of the pixel i is Li, the correcting unit corrects the luminance value Y ′ of the pixel i after correction. i is expressed by the following formula: Y′i = Yi / Li
The image processing apparatus according to claim 1, wherein the process for obtaining i = 1 to N is performed in accordance with
に従って求める処理をi=1〜Nについて行うことを特徴とする請求項1に記載の画像処理装置。 When the luminance value of the pixel i (i = 1,, N) constituting the pattern is Yi and the low frequency component of the pixel i is Li, the correcting unit corrects the luminance value Y ′ of the pixel i after correction. i is represented by the following formula: Y′i = Yi / Li γ
The image processing apparatus according to claim 1, wherein the process for obtaining i = 1 to N is performed in accordance with
前記画像の輝度成分で構成される輝度画像を生成する生成工程と、
前記輝度画像を再帰的に縮小することで、複数枚の縮小画像を生成する縮小工程と、
前記縮小画像上の各位置に所定サイズの矩形を配置した場合に、当該矩形内のパターンを構成するそれぞれの画素の輝度値を抽出する抽出する第1の抽出工程と、
前記それぞれの画素の低周波成分を求める計算工程と、
前記それぞれの画素の輝度値を、前記それぞれの画素の低周波成分を用いて補正する補正工程と、
前記補正工程で輝度値が補正されたパターンが顔のパターンであるかを判別する判別工程と、
前記判別工程で顔のパターンと判別されたパターンを出力する出力工程と
を備えることを特徴とする画像処理方法。 An acquisition step of acquiring an image including a predetermined subject;
A generation step of generating a luminance image composed of luminance components of the image;
A reduction process for generating a plurality of reduced images by recursively reducing the luminance image;
A first extraction step of extracting, when a rectangle of a predetermined size is arranged at each position on the reduced image, extracting a luminance value of each pixel constituting the pattern in the rectangle;
A calculation step for obtaining a low frequency component of each of the pixels;
A correction step of correcting the luminance value of each of the pixels using a low frequency component of each of the pixels;
A determination step of determining whether the pattern whose luminance value has been corrected in the correction step is a face pattern;
An image processing method comprising: an output step of outputting the pattern determined as the face pattern in the determination step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005204737A JP2007025901A (en) | 2005-07-13 | 2005-07-13 | Image processor and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005204737A JP2007025901A (en) | 2005-07-13 | 2005-07-13 | Image processor and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007025901A true JP2007025901A (en) | 2007-02-01 |
Family
ID=37786597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005204737A Withdrawn JP2007025901A (en) | 2005-07-13 | 2005-07-13 | Image processor and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007025901A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009032019A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
JP2009032021A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
JP2009032018A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
-
2005
- 2005-07-13 JP JP2005204737A patent/JP2007025901A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009032019A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
JP2009032021A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
JP2009032018A (en) * | 2007-07-26 | 2009-02-12 | Seiko Epson Corp | Image processor, image processing method and computer program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11716527B2 (en) | Photographing apparatus, method and medium using image recognition | |
US8977056B2 (en) | Face detection using division-generated Haar-like features for illumination invariance | |
US8055067B2 (en) | Color segmentation | |
US10304164B2 (en) | Image processing apparatus, image processing method, and storage medium for performing lighting processing for image data | |
JP5361524B2 (en) | Pattern recognition system and pattern recognition method | |
JP2007047965A (en) | Method and device for detecting object of digital image, and program | |
WO2018233637A1 (en) | Video processing method and apparatus, electronic device, and storage medium | |
CN101983507A (en) | Automatic redeye detection | |
JP2006119817A (en) | Image processor | |
JP2007025900A (en) | Image processor and image processing method | |
JP2007025902A (en) | Image processor and image processing method | |
CN111222433A (en) | Automatic face auditing method, system, equipment and readable storage medium | |
JP4599110B2 (en) | Image processing apparatus and method, imaging apparatus, and program | |
JP2006323779A (en) | Image processing method and device | |
JP2007026308A (en) | Image processing method and image processor | |
JP4496005B2 (en) | Image processing method and image processing apparatus | |
JP2007025901A (en) | Image processor and image processing method | |
KR20110019969A (en) | Apparatus for detecting face | |
JP4789526B2 (en) | Image processing apparatus and image processing method | |
JP2009258770A (en) | Image processing method, image processor, image processing program, and imaging device | |
JP2007219899A (en) | Personal identification device, personal identification method, and personal identification program | |
JP2007048108A (en) | Image evaluation system, image evaluation method and image evaluation program | |
JP2004199200A (en) | Pattern recognition device, imaging apparatus, information processing system, pattern recognition method, recording medium and program | |
JP6776532B2 (en) | Image processing equipment, imaging equipment, electronic devices and image processing programs | |
JP4831344B2 (en) | Eye position detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081007 |