JP2010015463A - Method for detecting eye position - Google Patents

Method for detecting eye position Download PDF

Info

Publication number
JP2010015463A
JP2010015463A JP2008176154A JP2008176154A JP2010015463A JP 2010015463 A JP2010015463 A JP 2010015463A JP 2008176154 A JP2008176154 A JP 2008176154A JP 2008176154 A JP2008176154 A JP 2008176154A JP 2010015463 A JP2010015463 A JP 2010015463A
Authority
JP
Japan
Prior art keywords
image
eye position
frame
eye
face area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008176154A
Other languages
Japanese (ja)
Other versions
JP4775599B2 (en
Inventor
Hiroshi Ikeda
浩 池田
Keiichi Moriya
圭一 森谷
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.)
Kao Corp
Original Assignee
Kao Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kao Corp filed Critical Kao Corp
Priority to JP2008176154A priority Critical patent/JP4775599B2/en
Publication of JP2010015463A publication Critical patent/JP2010015463A/en
Application granted granted Critical
Publication of JP4775599B2 publication Critical patent/JP4775599B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To detect automatically an eye position from a moving image with ease and high reliability. <P>SOLUTION: The method for detecting an eye position from a moving image includes the steps A: (A1) preparing from a frame of a moving image (original image) a blurred image (horizontal- and vertical-blurred image 24) that is blurred in two intersecting directions; obtaining a position of an intersection of edges in the blurring directions; (A2) preparing a face region detection image that has no gradation of the original image; (A3) and detecting a face region candidate in the face region detection image from a rectangular region that has an edge intersection in the gradation direction as an apex; and B: (B1) preparing a plurality of eye position detection images whose brightness changes for every face region candidate; (B2) detecting a pixel group that gradually appears in the image as the eye position detection image fades in low brightness from a state of fading out with high brightness; (B3) selecting pixel groups that appear in pairs as eye position candidates from the detected pixel group regions; and (B4) identifying the eye position candidates as eye positions based on their appearance frequencies. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、動画像から目の位置を自動的に検出する方法および検出システムに関する。   The present invention relates to a method and a detection system for automatically detecting an eye position from a moving image.

顔画像における目の位置は、被験者の顔画像に髪型のモデル画像を重ねて髪型シミュレーション画像を形成する場合や、被験者の顔画像に唇、眉等の化粧画像を重ねてメイクアップシミュレーション画像を形成する場合に、画像の大きさの調整や位置合わせのために検出されている。また、目の位置の検出や顔領域の位置の検出は、顔画像の目隠し処理、顔画像のフレーム処理、個人認証用画像の作成等においてもなされている。   The position of the eye in the face image can be obtained by overlaying a hairstyle model image on the subject's face image to form a hairstyle simulation image, or by overlaying a makeup image such as lips or eyebrows on the subject's face image. In this case, the image is detected for adjusting the size of the image or aligning the image. The detection of the position of the eyes and the detection of the position of the face area are also performed in face image blindfolding processing, face image frame processing, creation of an image for personal authentication, and the like.

従来、顔画像から目の位置を検出する方法としては、肌色領域の抽出により顔を検出し、さらにパターンマッチング等により目を検出する方法等が使用されている(非特許文献1、特許文献1)。   Conventionally, as a method for detecting an eye position from a face image, a method of detecting a face by extracting a skin color region and further detecting an eye by pattern matching or the like has been used (Non-Patent Document 1, Patent Document 1). ).

2005年第5回LSI IPデザインアワード受賞論文「高速・高信頼な顔検出を可能とする顔候補点検出法」(日経BP社)2005 5th LSI IP Design Award Winning Paper “Face candidate point detection method that enables fast and reliable face detection” (Nikkei Business Publications) 特開2004−94917JP 2004-94917 A

しかしながら、肌色領域の抽出は照明環境の影響を受ける。そのため、種々の照明環境で撮られた不特定多数の顔画像を対象とする場合には信頼性が問題となる。また、パターンマッチングの手法は、計算量が莫大となるという問題がある。したがって、画像の明るさが大きく変動することがあり、顔画像の数や位置も刻々と変動し、さらに一秒間に数コマ以上のフレームの処理が必要とされる動画においては、目の位置を自動的に検出することが大きな課題となっていた。   However, the extraction of the skin color area is affected by the lighting environment. Therefore, reliability becomes a problem when an unspecified number of face images taken in various lighting environments are targeted. Further, the pattern matching method has a problem that the amount of calculation becomes enormous. Therefore, the brightness of the image may fluctuate greatly, the number and position of the face image will fluctuate every moment, and the position of the eye will be changed in a movie that requires processing of several frames or more per second. Automatic detection has been a major issue.

これに対し、本発明は、動画像から目の位置や顔領域の位置を、簡便な手法で自動的に信頼性高く検出できるようにすることを目的とする。   On the other hand, an object of the present invention is to enable automatic and highly reliable detection of the position of eyes and the position of a face region from a moving image by a simple method.

本発明者らは、(1)元画像から水平・垂直等の交差する2方向のぼかし画像を作成し、そのぼかし画像のぼかし方向のエッジを算出し、さらにそれらの交点を求め、一方、(2)顔画像を含む元画像の階調をつぶすことにより、好ましくは、髪領域と顔領域は判別できるが顔の造作は判別できない画像を得、(3)この階調をつぶした画像上でぼかし方向のエッジの交点を考えると、この交点を頂点とする矩形領域であって、その左右及び上に隣接する領域に比して明度が高い領域に顔画像が存在する場合が多く、したがって、かかる矩形領域を顔領域候補とすることができること、(4)個々の顔領域候補について、明度が変化した複数の画像を作成すると、高明度側のフェードアウトした画像から低明度側の画像に順次フェードインするに伴い、最初に現れる画素が瞳領域のものであること、(5)この場合、瞳領域の画素は対になって現れ、これにより目の位置候補を定められること、そして、(6)対をなして現れた目の位置候補の全ての目の位置検出用画像にわたる出現度数の集積結果から目の位置候補を特定できること、この目の位置の特定方法は、処理速度の要求される動画に好適であることを見出した。   The inventors of the present invention (1) create a blurred image in two directions such as horizontal and vertical intersecting from the original image, calculate the edge of the blurred image in the blur direction, and further determine the intersection between them, 2) By crushing the gradation of the original image including the face image, it is preferable to obtain an image that can discriminate between the hair area and the face area but not the face structure, and (3) Considering the intersection of the edges in the blur direction, the face image often exists in a rectangular area having this intersection as a vertex and having a higher brightness than the areas adjacent to the left and right and above, and therefore This rectangular area can be used as a face area candidate. (4) For each face area candidate, when multiple images with varying brightness are created, fade-out images on the high brightness side are sequentially faded to images on the low brightness side. First, (5) In this case, the pixels in the pupil area appear in pairs, and thus the eye position candidates can be determined, and (6) appear in pairs. The eye position candidate can be identified from the accumulation result of appearance frequencies over all eye position detection images of the eye position candidate, and this eye position identifying method is suitable for a moving image requiring processing speed. I found it.

即ち、本発明は、動画像において目の位置を検出する方法であって、
A.(A1)動画像のフレーム(以下、元画像とも称する)から交差する2方向にぼかしたぼかし画像を作成し、該ぼかし画像におけるぼかし方向のエッジの交点の位置を求めると共に、
(A2)元画像の階調をつぶした顔領域検出用画像を作成し、
(A3)顔領域検出用画像において、ぼかし方向のエッジの交点を一つの頂点とする矩形領域であって、その左右及び上の隣接領域に比して明度が高い領域を顔領域候補として検出する工程、
B.(B1)顔領域候補ごとに、明度が変化した複数の目の位置検出用画像を作成し、
(B2)目の位置検出用画像が高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出し、
(B3)検出した画素の固まり領域のうち対となって現れたものを目の位置候補として選択し、
(B4)各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置候補を目の位置として特定する工程、
を有する目の位置の検出方法を提供する。
That is, the present invention is a method for detecting the position of an eye in a moving image,
A. (A1) Create a blurred image blurred in two directions intersecting from a moving image frame (hereinafter also referred to as an original image), determine the position of the intersection of the edges in the blurred direction in the blurred image,
(A2) Create a face area detection image with the gradation of the original image collapsed,
(A3) In a face area detection image, a rectangular area having an intersection of edges in the blur direction as one vertex and having a higher brightness than the left and right and upper adjacent areas is detected as a face area candidate. Process,
B. (B1) For each face area candidate, create a plurality of eye position detection images with varying brightness,
(B2) As the eye position detection image fades in from a state of fading out at a high brightness to a low brightness, a cluster area of pixels that gradually appears in the eye position detection image is detected,
(B3) Select the clustered areas of the detected pixels that appeared in pairs as eye position candidates,
(B4) specifying the eye position candidate as the eye position based on the appearance frequency over all eye position detection images of each eye position candidate;
A method for detecting the position of an eye having

また、上述の目の位置の検出方法で目の位置を特定した後、その目の位置に対応する顔領域候補に基づいて顔領域を特定する顔領域の位置の検出方法を提供する。   Further, the present invention provides a face area position detection method for specifying a face area based on a face area candidate corresponding to the eye position after the eye position is specified by the above-described eye position detection method.

さらに、本発明は、動画像の取得手段、及び演算手段を備えた目の位置の検出システムであって、演算手段が、
元画像から交差する2方向にぼかしたぼかし画像を作成する機能、該ぼかし画像のぼかし方向のエッジを検出し、それらの交点の位置を求める機能、元画像の階調をつぶした顔領域検出用画像を作成する機能、顔領域検出用画像において、ぼかし方向のエッジの交点を一つの頂点とする矩形領域であって、その左右及び上の隣接領域に比して明度が高い領域を顔領域候補として検出する機能、顔領域候補ごとに、目の位置検出用画像として明度が変化した複数の画像を作成する機能、その画像が高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出する機能、検出した画素の固まり領域のうち対となって現れたものを目の位置候補として選択する機能、及び各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置を特定する機能を備えている目の位置の検出システムを提供する。
Furthermore, the present invention is an eye position detection system provided with moving image acquisition means and calculation means, wherein the calculation means comprises:
A function that creates a blurred image that is blurred in two directions intersecting with the original image, a function that detects edges in the blur direction of the blurred image and finds the position of those intersections, and a face area detection that collapses the gradation of the original image Image creation function, a face area detection image is a rectangular area whose intersection is the intersection of edges in the blur direction and has a higher brightness than the adjacent areas on the left and right and above As a function to create a plurality of images whose brightness has changed as eye position detection images for each face area candidate, as the image fades out from a state of fading out with high brightness to low brightness, A function for detecting a cluster area of pixels that gradually appear in the eye position detection image, a function for selecting a pair of detected pixel cluster areas that appear as a pair, and each eye Providing a detection system of the position of the eye has a function of specifying the position of the eye based on the frequency of occurrence over all eye position detecting image position candidate.

また、本発明は、動画像の取得手段及び演算手段を備えた顔領域の位置の検出システムであって、その演算手段が、上述の目の位置の検出システムの演算装置の機能に加えて、顔領域候補のうち目の位置が特定されたものを顔領域として特定する機能を有する顔領域の位置の検出システムを提供する。   Further, the present invention is a face region position detection system provided with a moving image acquisition means and a calculation means, the calculation means, in addition to the function of the calculation device of the eye position detection system described above, Provided is a face region position detection system having a function of identifying a face region candidate whose eye position is identified as a face region.

本発明の方法あるいはシステムによれば、動画像において、顔画像が存在しそうな顔領域候補を自動的に検出し、その顔領域候補毎に、明度を変化させた画像を複数形成して目の位置を特定するので、照明環境、被験者の肌色、被験者の瞳の色、顔画像における顔の向き等にかかわらず、動画像のフレームに含まれる目の位置や、その目の位置に対応する顔領域を自動的に信頼性高く短時間で検出することができる。   According to the method or system of the present invention, a face area candidate that is likely to contain a face image is automatically detected in a moving image, and a plurality of images with different brightness values are formed for each face area candidate. Since the position is specified, regardless of the lighting environment, the subject's skin color, the subject's pupil color, the face orientation in the face image, etc., the position of the eye included in the frame of the moving image and the face corresponding to the position of the eye The area can be automatically detected in a short time with high reliability.

さらに、本発明の方法あるいはシステムのうち、目の位置の検出方法あるいはシステムによれば、目の位置を基準にして種々のヘアスタイル画像を任意の顔画像にフィッティングさせる髪型シミュレーション画像の形成や、目の位置を基準にして化粧後の顔の部分画像を任意の顔画像にフィッティングさせる化粧シミュレーション画像の形成等のように、目の位置を基準にして複数の画像情報をフィッティングさせることによりシミュレーション画像を形成する場合に、自然さのある動画のシミュレーション画像を短時間で形成することが可能となる。   Furthermore, according to the eye position detection method or system of the method or system of the present invention, the formation of a hairstyle simulation image for fitting various hairstyle images to an arbitrary face image based on the eye position, Simulation image by fitting multiple pieces of image information based on eye position, such as forming a makeup simulation image that fits a partial facial image after makeup to an arbitrary face image based on eye position When forming the image, it becomes possible to form a simulation image of a natural moving image in a short time.

また、個人情報保護のための目隠し処理のように、目及びその近傍領域を塗りつぶしたり、モザイクをかけたり、さらには、顔領域全体にモザイクをかける等の画像処理を行う場合にも、本発明の方法あるいはシステムを好適に用いることができる。   The present invention also applies to image processing such as painting the eye and its neighboring area, applying a mosaic, and applying a mosaic to the entire face area, such as a blindfold process for protecting personal information. The method or system can be suitably used.

以下、図面を参照しつつ本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail with reference to the drawings.

図1は、本発明の目の位置の検出方法の一実施例の流れ図であり、図2は、この方法を実施する目の位置の検出システムのブロック図である。   FIG. 1 is a flowchart of an embodiment of the eye position detection method of the present invention, and FIG. 2 is a block diagram of an eye position detection system for implementing this method.

このシステム10は、撮像装置1及びパソコン本体2からなっており、パソコン本体2には、ディスプレイ3、プリンタ4等が接続されている。   The system 10 includes an imaging apparatus 1 and a personal computer main body 2, and a personal computer main body 2 is connected to a display 3, a printer 4, and the like.

撮像装置1は、被験者の顔画像の取得手段として設けられており、デジタルビデオカメラ、ウェブカメラ等の市販の動画像が撮影可能なカメラを使用することができる。撮像装置1とパソコン本体2の間には、必要に応じてビデオキャプチャーを接続する。   The imaging device 1 is provided as means for acquiring a face image of a subject, and a commercially available camera that can capture a moving image such as a digital video camera or a web camera can be used. A video capture is connected between the imaging device 1 and the personal computer body 2 as necessary.

パソコン本体2は、演算手段として設けられており、概略、カラー画像のグレースケール化、階調の変更、明度補正、画像サイズの変更、全体的ぼかし、水平、垂直等の所定方向のぼかし、エッジ抽出、画像の重ね合わせ、図形の拡大・縮小機能等の画像処理機能や、これらを組み合わせて後述するように所定のフェードイン割合のフェードイン画像を作成する機能、明度の変化に伴ってコントラストを変化させる機能(例えば、明度を高くするにしたがいコントラストを下げ、また、明度を低くするにしたがいコントラストをあげる機能)等を備えている。これらの個々の画像処理機能は、例えば、アドビシステム社製フォトショップ等の市販のイメージ処理ソフトをパソコン本体2に搭載することにより得ることができる。   The personal computer main body 2 is provided as a calculation means, and roughly, gray scale of a color image, gradation change, brightness correction, image size change, overall blur, blur in a predetermined direction such as horizontal and vertical, edge Image processing functions such as extraction, image superposition, figure enlargement / reduction functions, etc., and a function to create a fade-in image with a predetermined fade-in ratio by combining these functions as described later. It has a function of changing (for example, a function of decreasing the contrast as the brightness is increased and increasing the contrast as the brightness is decreased). These individual image processing functions can be obtained by, for example, installing commercially available image processing software such as Photoshop manufactured by Adobe System Co. in the personal computer main body 2.

また、このパソコン本体2は、明度の異なる複数の画像を明度の低い又は高い順にリスト番号を付けて管理する機能、画像上で所定領域の明度を他の領域の明度と対比し、所定の抽出条件の下に選択する機能等を有しており、より具体的には、元画像から、交差する2方向にぼかしたぼかし画像として水平・垂直ぼかし画像を作成し、その水平・垂直ぼかし画像の水平エッジと垂直エッジを検出し、その交点の位置を求める機能、元画像の階調をつぶした目の位置検出対象領域設定用画像を作成する機能、目の位置検出対象領域設定用画像において、前記水平エッジと垂直エッジの交点を一つの頂点とする矩形領域を設定する機能、矩形領域のうち、左右及び上の隣接領域に比して明度が高い領域を顔領域候補として検出する機能、顔領域候補ごとに、目の位置検出用画像として明度が変化した複数の画像を作成する機能、その画像が高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出する機能、検出した画素の固まり領域のうち対となって現れたものを目の位置候補として選択する機能、及び各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置を特定する機能等を有している。   The personal computer body 2 has a function of managing a plurality of images with different brightness by assigning a list number in order of increasing or decreasing brightness. The brightness of a predetermined area on the image is compared with the brightness of other areas to perform predetermined extraction. More specifically, a horizontal / vertical blurred image is created as a blurred image that is blurred in two intersecting directions from the original image, and the horizontal / vertical blurred image In the function of detecting the horizontal edge and the vertical edge and obtaining the position of the intersection, the function of creating the eye position detection target area setting image in which the gradation of the original image is crushed, the eye position detection target area setting image, A function for setting a rectangular area having an intersection of the horizontal edge and the vertical edge as one vertex; a function for detecting an area having a higher brightness as compared with the adjacent area on the left and right and above the rectangular area as a face area candidate; Area A function to create multiple images with varying brightness as eye position detection images for each eye, as the image fades in from a state that fades out at high brightness to a low brightness, the eye position detection image gradually A function for detecting a cluster area of appearing pixels, a function for selecting a pair of detected pixel cluster areas appearing as eye position candidates, and an image for detecting the position of all eyes of each eye position candidate The function of specifying the position of the eyes based on the appearance frequency over the entire range.

また、パソコン本体2は、撮像装置1から所定のフレームレートで転送されるフレームを必要に応じて選択する機能、あるフレームNについて目の位置が特定された場合に、その位置を記憶し、その位置の周辺を、その後の所定時間分のフレームにおいて目の位置の検出対象とする顔画像領域候補とする機能、あるフレームについて目の位置が特定された場合に、その後の所定時間分のフレームにおいて、フレームNにおいて目の位置が特定された顔領域候補の最大サイズを顔画像サイズ枠とし、顔領域検出用画像上で顔画像サイズ枠を走査し、該枠内の中央部に比して周辺部が低明度となる領域を顔領域候補として検出する機能、あるフレームについて目の位置が特定された場合に、次のフレームN+1では、フレームNにおいて目の位置が特定された顔領域候補を顔領域候補とすると共に、フレームNにおいて目の位置が特定された顔領域候補をフレームN+1の元画像から除いた画像から顔領域候補を検出する機能等を有している。   In addition, the personal computer main body 2 stores the position when a position of the eye is specified for a certain frame N, a function for selecting a frame transferred at a predetermined frame rate from the imaging apparatus 1 as necessary. A function of setting the periphery of the position as a face image area candidate for detection of the position of the eye in a frame for a predetermined time after that, when the position of the eye is specified for a certain frame, The maximum size of the face area candidate whose eye position is specified in the frame N is set as a face image size frame, the face image size frame is scanned on the face area detection image, and the peripheral area is compared with the center portion in the frame. A function for detecting a region with low brightness as a face region candidate, and when the position of an eye is specified for a certain frame, the position of the eye in frame N in the next frame N + 1 The specified face area candidate is used as a face area candidate, and the face area candidate is detected from an image obtained by removing the face area candidate whose eye position is specified in frame N from the original image of frame N + 1. Yes.

このシステム10を用いた動画像における目の位置の検出方法は、図1に示すように、概略、動画像の各フレームについて
A.フレームを処理対象とする元画像とし、その元画像から顔領域候補を検出する工程、
B.顔領域候補ごとに目の位置候補を検出し、それを特定する工程
の2つの工程からなる。
As shown in FIG. 1, the method for detecting the position of the eye in the moving image using the system 10 is roughly as follows. A step of setting a frame as an original image to be processed and detecting a face region candidate from the original image;
B. It consists of two steps: a step of detecting an eye position candidate for each face region candidate and specifying it.

工程Aでは、まず、目の位置の検出対象とする動画像のフレームを、元画像としてパソコン本体2に取得する。元画像は、例えば、撮像装置1で顔画像を含む動画を撮り、それをパソコン本体2に取り込ませてもよく、動画が記録されているDVD等の記録媒体やインターネット等の通信回線を利用してパソコン本体2に動画を取得してもよく、必要に応じてビデオキャプチャーを使用する。   In the process A, first, a frame of a moving image to be detected for eye position is acquired in the personal computer main body 2 as an original image. As the original image, for example, a moving image including a face image may be taken by the imaging apparatus 1 and may be taken into the personal computer main body 2. The video may be acquired in the personal computer main body 2, and video capture is used as necessary.

なお、1つの元画像中に含まれる顔画像の数は、単数でも複数でもよいが、本発明は複数の顔画像のとき、更に複数の顔画像のサイズが異なるときに特に効果を発揮する。   The number of face images included in one original image may be one or more, but the present invention is particularly effective when there are a plurality of face images and when the sizes of the plurality of face images are different.

次に、必要に応じて、元画像にグレースケール化、サイズ調整、ぼかし、明度補正等の前処理を行う。   Next, pre-processing such as gray scaling, size adjustment, blurring, and brightness correction is performed on the original image as necessary.

このうち、グレースケール化は、本発明の目の位置の検出方法では、カラー情報が不要であるため、取得した元画像がカラー画像の場合に、後の処理量を低減させるために行う。   Of these, gray scale conversion is performed in order to reduce the amount of subsequent processing when the acquired original image is a color image because the eye position detection method of the present invention does not require color information.

グレースケール化の方法としては、各画素において、(1)R、G、Bの各値の最大値と最小値の平均を利用する方法、(2)R、G、Bの各値の平均を利用する方法、(3)R、G、Bの各値に所定の重み付け係数(NTSC等)を掛けた後、それらの平均をとる方法等を使用することができる。例えば、(3)の方法においては、次式
Y(出力輝度)=0.298912×R+0.568811×G+0.114478×B
を利用すればよい。
As a gray scale method, for each pixel, (1) a method that uses the average of the maximum and minimum values of R, G, and B, and (2) the average of each value of R, G, and B A method to be used, (3) a method of multiplying each value of R, G, and B by a predetermined weighting coefficient (NTSC, etc.) and then averaging them can be used. For example, in the method (3), the following equation Y (output luminance) = 0.298912 × R + 0.568811 × G + 0.114478 × B
Can be used.

サイズ調整は、元画像を目の位置の検出処理に適した画像サイズに調整するもので、具体的には、検出精度の点から長辺を320ピクセル以上とすることが好ましく、汎用パソコンの演算速度の点から長辺を480以下のピクセル程度に画面サイズを変更することが好ましい。   The size adjustment is to adjust the original image to an image size suitable for the eye position detection process. Specifically, the long side is preferably 320 pixels or more from the viewpoint of detection accuracy. In view of speed, it is preferable to change the screen size so that the long side is about 480 pixels or less.

ぼかし処理は、元画像中の顔画像がシャープであると、後の画像処理で細かいエッジが多数現れ、目の位置候補の検出のノイズとなるので、必要に応じて行う。この場合、ぼかしの程度は、弱〜中とすることが好ましく、例えば、各画素について、注目点の画素とその周囲の25画素に対して1〜5の重み付ぼかしフィルタを使用して輝度の平均値を出力するぼかし処理を行う。このぼかし処理は、必要に応じて複数回行っても良い。   If the face image in the original image is sharp, a lot of fine edges appear in the subsequent image processing, and blurring processing is performed as necessary because it becomes noise for detecting eye position candidates. In this case, it is preferable that the degree of blurring is weak to medium. For example, for each pixel, the weighting blur filter of 1 to 5 is used for the pixel of interest and the surrounding 25 pixels. Performs blurring to output the average value. This blurring process may be performed a plurality of times as necessary.

明度補正は、顔領域検出用画像の作成に際し、元画像が極端に明るかったり暗かったりする場合に行うことが好ましい。明度補正の方法としては、例えば、図3A(a)のように明るすぎる元画像について、あるいは図3B(a)のように暗すぎる元画像について、それぞれ元画像の明度ヒストグラムを作成し、最大カウント数の1.5%〜15%、好ましくは3%〜8%以下のカウント数である画素値のカウント数をゼロとした後、カウント数がゼロではない画素値のうち最大の画素値Xmaxおよび最小の画素値Xminを求める。次に、図3A(b)、図3B(b)のように、元画像の画素値Xiを次式に代入して明度補正後の画素値とすることにより元画像の明度補正を行う。   The brightness correction is preferably performed when the face image detection image is created when the original image is extremely bright or dark. As a brightness correction method, for example, a brightness histogram of an original image is created for an original image that is too bright as shown in FIG. 3A (a) or an original image that is too dark as shown in FIG. After setting the count value of the pixel value which is 1.5% to 15% of the number, preferably 3% to 8% or less to zero, the maximum pixel value Xmax among the pixel values whose count value is not zero and The minimum pixel value Xmin is obtained. Next, as shown in FIGS. 3A (b) and 3B (b), the original image brightness correction is performed by substituting the pixel value Xi of the original image into the following equation to obtain the pixel value after the brightness correction.

但し、Xi<Xminの場合、Xi=Xminとし、
Xi>Xmaxの場合、Xi=Xmaxとする。
However, if Xi <Xmin, Xi = Xmin,
If Xi> Xmax, Xi = Xmax.

明度補正の方法としては前述の方法に限らず、種々の方法が適用可能である。例えば、予め任意の画像を基準画像とし、その平均明度を測定すると共に、水平・垂直ぼかし画像の作成及び顔領域検出用画像の作成のための適正明度変化量を決定しておき、基準画像の平均明度に対する元画像の平均明度の比率を算出し、基準画像における適正明度変化量に平均明度の比率を乗じた量だけ元画像の明度を変化させて元画像の明度を補正する。   The brightness correction method is not limited to the above-described method, and various methods can be applied. For example, an arbitrary image is set as a reference image in advance, the average brightness is measured, and an appropriate brightness change amount for creating a horizontal / vertical blurred image and a face area detection image is determined. The ratio of the average brightness of the original image to the average brightness is calculated, and the brightness of the original image is corrected by changing the brightness of the original image by an amount obtained by multiplying the appropriate brightness change amount in the reference image by the average brightness ratio.

ここで、基準画像における適正明度変化量の決定は次のように行う。まず、基準画像の平均明度を明暗両方向に1階調ずつ変化させた画像を作成し、それぞれの画像に対して後述する目の位置の検出対象領域の検出を行い、その検出結果が実際に顔画像の存在する領域と整合しているかを目視で判断し、その検出の成功率を計算する。そしてその成功率が最大になる画像の平均明度を求め、これと基準画像の平均明度との差を適正明度変化量とする。   Here, the appropriate brightness change amount in the reference image is determined as follows. First, an image in which the average brightness of the reference image is changed by one gradation in both the light and dark directions is created, a detection target area of an eye position described later is detected for each image, and the detection result is actually a face. It is judged visually whether it matches with the area where the image exists, and the success rate of the detection is calculated. Then, the average brightness of the image with the highest success rate is obtained, and the difference between this and the average brightness of the reference image is set as the appropriate brightness change amount.

基準画像としては、5〜20人の顔画像が写っており、個々の顔画像の最大サイズと最小サイズの比が、顔の長さで1〜3倍以内であるものが好ましい。目の位置の検出対象領域の設定は次に示す方法によればよい。   As the reference image, face images of 5 to 20 persons are shown, and the ratio of the maximum size and the minimum size of each face image is preferably within 1 to 3 times the face length. The eye position detection target area may be set by the following method.

図4は、こうして元画像20に前処理として、グレースケール化、サイズ調整、ぼかし及び明度補正をしたときの、前処理前の元画像20と前処理後の元画像21を示している。   FIG. 4 shows the original image 20 before the pre-processing and the original image 21 after the pre-processing when the gray scale, size adjustment, blurring, and brightness correction are performed on the original image 20 as the pre-processing.

前処理をした後は、図1の工程A(A1)で、交差する2方向にぼかしたぼかし画像として、図5(c)のような水平・垂直ぼかし画像24を作成する。この水平・垂直ぼかし画像24は、同図(a)のように作成した水平ぼかし画像22と同図(b)のように作成した垂直ぼかし画像23を合成したものである。なお、本発明において、ぼかし画像におけるぼかしの2方向は水平方向と垂直方向に限らず、例えば図7に示すように斜め2方向としてもよい。この場合、2方向の交差角は、鋭角側の角θを60°以上することが好ましい。ただし、その後の演算を簡単にするため、交差する2方向は水平方向と垂直方向とし、図5(c)に示したような水平・垂直ぼかし画像24を作成することが好ましい。   After pre-processing, in step A (A1) in FIG. 1, a horizontal / vertical blurred image 24 as shown in FIG. 5C is created as a blurred image blurred in two intersecting directions. The horizontal / vertical blurred image 24 is a combination of the horizontal blurred image 22 created as shown in FIG. 10A and the vertical blurred image 23 created as shown in FIG. In the present invention, the two blur directions in the blurred image are not limited to the horizontal direction and the vertical direction, and may be two oblique directions as shown in FIG. 7, for example. In this case, it is preferable that the angle θ on the acute angle side be 60 ° or more as the crossing angle in the two directions. However, in order to simplify the subsequent calculation, it is preferable that the intersecting two directions are the horizontal direction and the vertical direction, and the horizontal / vertical blurred image 24 as shown in FIG. 5C is created.

ぼかし画像におけるぼかしの程度は、例えば、水平ぼかし画像22では、元画像20に対し、1画素ごとに、該画素を中心とする水平方向80〜120ピクセルの平均画素値を求め、その画素値を当該画素の画素値とするという操作を全画素について行うことにより得ることができ、同様に、垂直ぼかし画像23では、元画像20に対して、1画素ごとに、該画素を中心とする垂直方向80〜120ピクセルの平均画素値を求め、その画素値を当該画素の画素値とするという操作を全画素について行うことにより得ることができる。   For example, in the case of the horizontal blurred image 22, an average pixel value of 80 to 120 pixels in the horizontal direction centered on the pixel is obtained for each pixel in the horizontal blurred image 22, and the pixel value is calculated. It can be obtained by performing the operation of setting the pixel value of the pixel for all the pixels. Similarly, in the vertical blurred image 23, the vertical direction centering on the pixel for each pixel with respect to the original image 20 It can be obtained by calculating an average pixel value of 80 to 120 pixels and setting the pixel value as the pixel value of the pixel for all pixels.

この他、水平ぼかし画像22や垂直ぼかし画像23の作成方法としては、まず、水平ぼかし画像と垂直ぼかし画像を作成し、次にそれらを合成するという2段階の手法によらず、各画素について、該画素を中心とする水平方向80〜120ピクセルと垂直方向80〜120ピクセルの平均画素値を同時に演算する方法によってもよい。   In addition, as a method of creating the horizontal blurred image 22 and the vertical blurred image 23, first, a horizontal blurred image and a vertical blurred image are generated, and then, without combining the two steps of combining them, for each pixel, The average pixel value of the horizontal direction 80 to 120 pixels and the vertical direction 80 to 120 pixels centered on the pixel may be calculated simultaneously.

次に、図6に示す水平・垂直エッジ画像25のように、水平・垂直ぼかし画像24における水平エッジと垂直エッジを求め、それらのエッジの交点の位置を求める。水平エッジや垂直エッジの検出には、ぼかし機能も備えたエッジフィルタを使用することが好ましく
、例えば、次式の水平エッジフィルタや、垂直エッジフィルタを使用することができる。
Next, as in the horizontal / vertical edge image 25 shown in FIG. 6, the horizontal edge and the vertical edge in the horizontal / vertical blurred image 24 are obtained, and the position of the intersection of these edges is obtained. For detection of a horizontal edge or a vertical edge, it is preferable to use an edge filter having a blurring function. For example, a horizontal edge filter or a vertical edge filter of the following formula can be used.

一方、図1の工程(A2)で、元画像の階調をつぶした顔領域検出用画像を作成する。   On the other hand, in step (A2) of FIG. 1, a face area detection image in which the gradation of the original image is crushed is created.

顔領域検出用画像としては、図8Aに示すように、元画像20の明度を変化させることにより、髪領域と顔領域は判別できるが顔の造作は判別できない状態、即ち、髪領域と顔領域はおおよそ判別できるが、顔内部は全く現れていないか、あるいは目・鼻・口はわかるが誰の顔だか判別しがたい状態に高階調側を多くつぶした画像を作成することが好ましい。   As the face area detection image, as shown in FIG. 8A, by changing the brightness of the original image 20, the hair area and the face area can be discriminated, but the face structure cannot be discriminated, that is, the hair area and the face area. However, it is preferable to create an image in which the high gradation side is crushed so that the inside of the face does not appear at all, or the face, eyes, nose, and mouth can be recognized but it is difficult to determine who the face is.

顔領域検出用画像26の作成方法は、元画像20の撮影条件にもよるが、基本的には元画像20から、フェードイン割合として25〜35%の画像を作成することが好ましい。   Although the method for creating the face area detection image 26 depends on the shooting conditions of the original image 20, it is basically preferable to create an image with a fade-in ratio of 25 to 35% from the original image 20.

ここで、所定のフェードイン割合の画像は、例えば、元画像が256階調の場合、以下の通りに作成することができる。   Here, for example, when the original image has 256 gradations, an image having a predetermined fade-in ratio can be created as follows.

まず、フェードイン0%の画像は、全ての画素の画素値を一律255とする。   First, in an image with 0% fade-in, the pixel values of all the pixels are uniformly set to 255.

また、フェードインx%の画像は、元画像において画素値が2.55x未満の画素は元画像の画素値を有し、画素値が2.55x以上の画素(但し、x>0)は一律画素値255を有するとする。   Further, in an image with fade-in x%, pixels having a pixel value of less than 2.55x in the original image have the pixel value of the original image, and pixels having a pixel value of 2.55x or more (provided that x> 0) are uniform. Suppose that it has a pixel value of 255.

例えば、フェードイン10%の画像は、元画像において、画素値が25.5(=255×0.1)未満の画素はその画素値のまま、画素値が25.5以上の画素は画素値を一律255にする。   For example, in a 10% fade-in image, pixels with a pixel value of less than 25.5 (= 255 × 0.1) remain the same in the original image, and pixels with a pixel value of 25.5 or more have a uniform pixel value. 255.

フェードイン20%の画像は、元画像において、画素値が51.0(=255×0.2)未満の画素はその画素値のまま、元画像の画素値が51.0以上の画素は画素値を一律255にする。   An image with 20% fade-in has a pixel value of less than 51.0 (= 255 × 0.2) in the original image, and a pixel value of 51.0 or higher in the original image remains the same. Set to 255.

フェードイン100%の画像は、全ての画素の画素値を元画像の画素値のままとする。   In an image with 100% fade-in, the pixel values of all the pixels remain the pixel values of the original image.

なお、顔領域検出用画像26は、図8Bに示すように、階調を反転させたネガ画像として形成し、以降の画像処理を、階調を反転させて行ってもよい。   As shown in FIG. 8B, the face area detection image 26 may be formed as a negative image with the gradation reversed, and the subsequent image processing may be performed with the gradation reversed.

また、顔領域検出用画像26の作成方法は、所定のフェードイン割合の画像を作成する方法に限らず、種々の2値化処理による方法が適用可能である。例えば、元画像20の明度ヒストグラムの中心明度値を閾値とする2値化処理など、元画像の特性に基づき閾値を決める種々の2値化処理(一般的に可変閾値処理と呼ばれている)により顔領域検出用画像26を作成することができる。   Further, the method of creating the face area detection image 26 is not limited to a method of creating an image having a predetermined fade-in ratio, and various binarization processing methods can be applied. For example, various binarization processes (generally referred to as variable threshold processes) for determining a threshold value based on the characteristics of the original image, such as a binarization process using the central brightness value of the brightness histogram of the original image 20 as a threshold value. Thus, the face area detection image 26 can be created.

次に、図1の工程A(A3)に示すように、顔領域検出用画像26において、顔領域であることが期待される顔領域候補を検出する。この顔領域候補としては、顔領域検出用画像26と、水平・垂直ぼかし画像の水平エッジと垂直エッジの交点を一つの頂点とする矩形領域であって、その左右及び上の隣接領域に比して明度が高い領域を検出する。これは、グレースケール画像では、肌や髪の色が異なる人種を問わず、また、頭髪の有無も問わず、顔領域が、頭、帽子、衣服、その他の顔領域の周囲に比して明るいという本発明者の知見に基づくものである。   Next, as shown in step A (A3) in FIG. 1, a face area candidate expected to be a face area is detected in the face area detection image 26. The face area candidate is a face area detection image 26 and a rectangular area having one vertex at the intersection of the horizontal edge and the vertical edge of the horizontal / vertical blurred image, compared to the left and right and upper adjacent areas. To detect areas with high brightness. This is because, in a grayscale image, the face area is compared to the periphery of the head, hat, clothing, and other face areas, regardless of race or hair color, and with or without hair. This is based on the inventor's knowledge that it is bright.

顔領域候補の具体的な検出方法としては、例えば、まず、図9に示すように、顔領域検出用画像26上に水平・垂直ぼかし画像の水平・垂直エッジ画像25を重ね、水平エッジと垂直エッジの各交点Pにおいて、その交点Pを一つの頂点とする微小な正方形30を想定し、交点Pを基点(即ち、相似形に拡大する場合の拡大中心)として正方形を次の(a)又は(b)の条件が満たされるまで右下方向、左下方向、右上方向及び左上方向にそれぞれ拡大する。
(a)正方形内で画素値255のピクセルの割合が60%を以上となった後に60%未満になったとき
(b)正方形の拡大方向の線幅1ピクセルの縦辺又は下辺をなすピクセルにおいて、画素値254以下のピクセルの割合が、1/3以下になった後に1/3以上になったとき
As a specific method of detecting a face area candidate, for example, as shown in FIG. 9, first, a horizontal / vertical blurred image 25 of a horizontal / vertical blurred image is superimposed on a face area detection image 26, and the horizontal edge and the vertical edge At each intersection P of the edge, a small square 30 having the intersection P as one vertex is assumed, and the square is defined as the following (a) or The image is expanded in the lower right direction, the lower left direction, the upper right direction, and the upper left direction until the condition (b) is satisfied.
(a) When the proportion of pixels having a pixel value of 255 in the square becomes more than 60% and then becomes less than 60%
(b) When the ratio of the pixels having a pixel value of 254 or less becomes 1/3 or less after the ratio of the pixel value of 254 or less in the pixels forming the vertical side or the lower side of the line width of 1 pixel in the square expansion direction

次に、図10に示すように、拡大を停止した時点の正方形31の左右及び上に隣接する領域で、それぞれ正方形の一辺を長辺とし、正方形の一辺の1/3〜1/2の長さを短辺とする長方形32a、32b、32cを想定し、これらの長方形32a、32b、32cについて、次の(p)又は(q)の条件が満たされる場合に、その正方形31を顔領域候補とする。なお、正方形31が顔領域検出用画像26の隅に位置するために上述の3つの長方形が全ては描けない場合でも、描ける範囲で長方形を描き、次の(p)又は(q)の条件を判断する。
(p)長方形32a、32b、32cの全ピクセルの10%以上、好ましくは20%以上が画素値254以下である
(q)長方形32a、32b、32cの長辺うち、正方形31側の長辺の長さの1/3以上、好ましくは2/5以上のピクセルが画素値254以下である
Next, as shown in FIG. 10, in a region adjacent to the left and right and above the square 31 at the time when the expansion is stopped, each side of the square is a long side, and the length is 1/3 to 1/2 of the side of the square. Assuming rectangles 32a, 32b, and 32c having short sides as short sides, if the following condition (p) or (q) is satisfied for these rectangles 32a, 32b, and 32c, the square 31 is selected as a face area candidate. And Even when all the above three rectangles cannot be drawn because the square 31 is located at the corner of the face area detection image 26, the rectangle is drawn within the drawable range, and the following conditions (p) or (q) are satisfied. to decide.
(p) 10% or more, preferably 20% or more of all the pixels of the rectangles 32a, 32b, and 32c have a pixel value of 254 or less.
(q) Among the long sides of the rectangles 32a, 32b, and 32c, a pixel having a pixel value of 254 or less is 1/3 or more, preferably 2/5 or more of the length of the long side on the square 31 side.

この顔領域候補の検出方法は、交点Pが、額と髪の境に生じる水平エッジと、顔とその左右の髪領域の境に生じる垂直エッジとの交点であり、額の角隅部から斜め外側上方の頭髪領域内に入った点となるか、あるいは、耳たぶの下あたりの点となる場合が多いことから、交点Pから微小な正方形30を右下方向、左下方向、右上方向又は左上方向に拡大すると、その拡大した正方形31が顔領域である場合には、その正方形31は、それに近接する領域よりも明るくなり、上述の条件を満たすことによる。   In this face area candidate detection method, the intersection point P is an intersection point of a horizontal edge generated at the boundary between the forehead and the hair and a vertical edge generated at the boundary between the face and the right and left hair areas. Since it is often a point that falls within the outer upper hair region or a point around the bottom of the earlobe, the small square 30 from the intersection point P is moved to the lower right direction, the lower left direction, the upper right direction, or the upper left direction. When the enlarged square 31 is a face area, the square 31 becomes brighter than the area adjacent to it and satisfies the above-described condition.

なお、交点Pを基点にして拡大する図形は、正方形に限らず、長方形等であってもよく、拡大を停止したときの図形と、明度を対比する近傍領域も、上述のような3つの長方形32a、32b、32cに限らず、例えば、正方形31をその左右及び上から囲むコ字状の領域を想定してもよい。顔領域候補の検索工程を、演算手段により完全に自動化できるようにする限り、適宜設定することができる。   The figure to be enlarged with the intersection point P as the base point is not limited to a square, but may be a rectangle or the like. The figure when the enlargement is stopped and the neighboring area for comparing the brightness are also the three rectangles as described above. Not limited to 32a, 32b, and 32c, for example, a U-shaped region surrounding the square 31 from the left and right sides and from above may be assumed. As long as the face area candidate search process can be completely automated by the calculation means, it can be set as appropriate.

こうして、図11に示すように、顔領域検出用画像26中に、複数の顔領域候補33を検出することができる。なお、同図に示したように、顔領域候補33の複数が一つの領域で重なっていてもよい。   Thus, as shown in FIG. 11, a plurality of face area candidates 33 can be detected in the face area detection image 26. As shown in the figure, a plurality of face area candidates 33 may overlap in one area.

顔領域候補33を検出した後は、個々の顔領域候補33ごとに目の位置を検出する工程Bを行う。   After the face area candidate 33 is detected, a process B for detecting the position of the eyes for each individual face area candidate 33 is performed.

工程Bでは、まず、工程(B1)において、目の位置候補の検出のため、顔領域候補ごとに、目の位置検出用画像として、明度が変化した複数の目の位置検出用画像を形成する。より具体的には、例えば図12に示すように、前述した所定のフェードイン割合の画像の形成方法に従ってフェードイン0%から漸次明度を低下させたフェードイン画像を、10〜80%まで1%刻みに70階層程度作成する。   In step B, first, in step (B1), in order to detect eye position candidates, a plurality of eye position detection images with varying brightness are formed as eye position detection images for each face region candidate. . More specifically, for example, as shown in FIG. 12, a fade-in image in which the brightness is gradually decreased from 0% fade-in according to the above-described image forming method with a predetermined fade-in ratio is reduced from 10% to 80% by 1%. Create about 70 levels in increments.

なお、このフェードイン画像の階層の作成に際しては、検出精度を保ちつつ処理速度を高くするため、予め、顔領域候補33のうち、一辺の大きさが80〜120ピクセルより大きなものは、一辺の大きさが80〜120ピクセルとなるように、各顔領域候補33の画像サイズを調整することが好ましく、また、ノイズを低下させるため、必要に応じてぼかし処理を行うことが好ましい。   In creating the fade-in image hierarchy, in order to increase the processing speed while maintaining the detection accuracy, a face area candidate 33 having a side larger than 80-120 pixels in advance is It is preferable to adjust the image size of each face region candidate 33 so that the size is 80 to 120 pixels, and it is preferable to perform blurring processing as necessary to reduce noise.

また、フェードイン画像の形成に際しては、明度を上げるにつれてコントラストを下げ、明度を下げるにつれてコントラストを上げると、フェードイン画像中に目の部分がより鮮明に現れるので好ましい。   Further, when forming a fade-in image, it is preferable to lower the contrast as the brightness is increased and to increase the contrast as the brightness is decreased, because an eye portion appears more clearly in the fade-in image.

この他、目の位置検出用画像として、例えば、γ値を漸次変化させることにより図12に示すように明度が変化した画像を複数形成してもよく、これ以外にも種々の一般的方法を用いることが可能である。   In addition, as the eye position detection image, for example, by gradually changing the γ value, a plurality of images whose brightness is changed as shown in FIG. 12 may be formed. It is possible to use.

図12からわかるように、検出対象領域の明度を上げて完全にフェードアウトさせた画像から明度を低下させてフェードイン画像の階層を形成していくと、通常、まず最初に瞳に画素の固まりが検出され、次に鼻や口に画素の固まりが検出される。また、瞳領域の画素の固まりは左右一対として現れる。   As can be seen from FIG. 12, when the brightness of a detection target region is increased and the brightness is decreased from an image that is completely faded out to form a hierarchy of fade-in images, normally, first, a cluster of pixels is first formed in the pupil. Then, a block of pixels is detected in the nose and mouth. The cluster of pixels in the pupil region appears as a pair of left and right.

そこで、工程B(B2)で、顔領域候補33から形成した目の位置検出用画像を高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出する。そして、工程B(B3)で目の位置候補として、左右一対の画素の固まりを選択する。階層によっては、瞳の他に口元、眉、額等の領域にも、画素の固まり領域が対になって現れるが、この段階では、これらの画素の固まり領域も目の位置候補として選択する。   Therefore, in step B (B2), the pixels that gradually appear in the eye position detection image as the eye position detection image formed from the face area candidate 33 fades in from the state of fading out at high brightness to the low brightness. Detect the mass area. In Step B (B3), a group of left and right pixels is selected as an eye position candidate. Depending on the hierarchy, pixel cluster areas appear in pairs in areas such as the mouth, eyebrows, and forehead in addition to the pupils. At this stage, these pixel cluster areas are also selected as eye position candidates.

この場合、対をなしている画素の固まり領域のうち、目の位置候補として選択するものの条件として、予め次の(1)、(2)を設定しておくことが好ましい。
(1)左右一対の画素の固まり領域の横方向の距離が一定の範囲にあること
(2)左右一対の画素の固まり領域の縦方向の距離が一定の範囲にあること
In this case, it is preferable that the following (1) and (2) are set in advance as a condition for selecting a candidate eye position from among the clustered regions of the paired pixels.
(1) The lateral distance of the cluster area of a pair of left and right pixels is within a certain range.
(2) The vertical distance between the left and right pixel cluster areas is within a certain range.

図13は、顔領域候補33のある階層のフェードイン画像において、顔領域中に現れた画素の固まり領域を矩形で示し、さらにこれらのうち対をなしているものを直線で結んだものである。   FIG. 13 shows a block area of pixels appearing in a face area in a fade-in image in a hierarchy with a face area candidate 33 as a rectangle, and a pair of these areas connected by a straight line. .

次に、工程(B4)で各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置候補を目の位置として特定する。より具体的には、まず、図14に示すように、各フェードイン画像毎に現れた一対の目の位置候補を、目の位置検出用画像の全階層にわたって集積し、その出現度数をカウントする。そして、このカウント数の多い順にランキングリストを作成し、原則的に最大カウントの目の位置候補の位置を目の位置として絞り込む。このカウントでは、フェードアウトした顔画像から段階的に明度を下げていった場合に最初に現れ、最終段階まで現れ続ける瞳領域の目の位置候補が通常、最大カウント(ランキング第1位)となる。   Next, in step (B4), eye position candidates are specified as eye positions based on the appearance frequencies of all eye position candidates over all eye position detection images. More specifically, first, as shown in FIG. 14, a pair of eye position candidates appearing for each fade-in image is accumulated over all layers of the eye position detection image, and the appearance frequency is counted. . Then, a ranking list is created in descending order of the number of counts, and the position of the eye position candidate with the maximum count is narrowed down to the eye position in principle. In this count, the eye position candidate that appears first when the brightness is gradually reduced from the faded-out face image and continues to appear until the final stage is normally the maximum count (ranking first).

目の位置候補の絞り込みに際しては、予め、フェードイン画像の階層の数に応じて予め目の位置の適否を判断することが好ましい。例えば、画素値0から255の間で100階層のフェードイン画像を作成した場合、最大カウント数が5以下のときには目ではないと判断する。この方法で目の位置の適否を判断する場合、フェードイン画像の階層数と、目の適否を判断する最大カウント数とは比例するように決めればよい。したがって、画素値0から255の間で作成するフェードイン画像を200階層にした場合は最大カウント数が10以下の場合に目でないと判断する。なお、このフェードイン画像の階層の数に応じた目の位置候補の適否の判断は、次に説明する(a)〜(c)の条件を判断した後に行ってもよい。   When narrowing eye position candidates, it is preferable to determine in advance whether or not the eye positions are appropriate according to the number of layers of the fade-in image. For example, when a 100-level fade-in image is created between pixel values 0 and 255, it is determined that the eye is not eye when the maximum count is 5 or less. When determining the suitability of the eye position by this method, the number of layers of the fade-in image and the maximum count number for judging the suitability of the eye may be determined so as to be proportional. Therefore, when the fade-in image created between pixel values 0 and 255 is 200 layers, it is determined that the maximum count number is 10 or less, which is not noticeable. The determination of the suitability of the eye position candidate according to the number of layers of the fade-in image may be made after determining the conditions (a) to (c) described below.

出現度数により絞り込んだ目の位置候補は、次の(a)〜(c)の条件を全て満たした場合、あるいは(d)の条件を満たした場合には、カウント数が2番目に多かった目の位置候補の位置を目の位置として特定する。   The eye position candidates narrowed down by the appearance frequency are those that have the second largest count when the following conditions (a) to (c) are all satisfied or when the condition (d) is satisfied. The position candidate position is specified as the eye position.

(a)ランキング第2位の目の位置候補が、ランキング第1位の目の位置候補より上方にある場合
(b)ランキング第2位の目の位置候補の目と目の中心間距離が、ランキング第1位の目の位置候補の中心間距離より長い場合
(c)ランキング第2位の目の位置候補の左右の瞳にあたる領域が、共にランキング第1位の目候補の左右の瞳にあたる位置よりも外側にある場合
(d)ランキング第1位の目の位置候補とランキング第2位の目の位置候補の縦方向の距離が、目と眉の距離程度に離れ、ランキング第1位の目の位置候補がランキング第2位の目の位置候補よりも上にある場合
(a) When the second position candidate for the ranking is higher than the first position candidate for the ranking
(b) When the distance between the center of the eye position candidate of the 2nd ranked eye is longer than the distance between the centers of the position candidate of the 1st ranked eye
(c) When the left and right pupil regions of the second ranking eye position candidate are both outside the positions corresponding to the left and right pupils of the first ranking eye candidate
(d) The vertical distance between the first position candidate of the ranking and the second position candidate of the ranking is about the distance between the eyes and the eyebrows, and the first position candidate of the ranking is ranked first. When the position is above the second position candidate

このうち、(a)〜(c)は、ランキング第1位がまれに口領域になることがあるのに対し、口の位置を目の位置であると誤判定しないためのものであり、(d)は、目の周りの眉等を目の位置であると誤判定しないためのものである。   Of these, (a) to (c) are intended to prevent erroneous determination of the position of the mouth as the position of the eye, while the first ranking in the ranking may rarely be the mouth area. d) is for preventing erroneous determination that the eyebrows around the eyes are the positions of the eyes.

こうして、図15に示すように、個々の目の位置の検出対象領域において、目の位置(より正確には瞳の位置)を正確に検出することが可能となる。   In this way, as shown in FIG. 15, it is possible to accurately detect the eye position (more precisely, the position of the pupil) in the detection target area of each eye position.

以上の目の位置の特定方法は、工程Aで設定した全ての顔領域候補についてそれぞれ行う。また、いずれかの顔領域候補において、目の位置を特定できなかった場合には、その領域には目が存在しないとして扱う。   The eye position specifying method described above is performed for all face area candidates set in step A. Further, when the position of the eye cannot be specified in any face area candidate, it is handled that there is no eye in that area.

また、目の位置候補から特定した目の位置を、最終的に図16に示すように元画像の対応する位置に重ねることにより、元画像における個々の顔画像の目の位置とすることが可能となる。   Further, the eye positions specified from the eye position candidates can be finally overlapped with the corresponding positions of the original image as shown in FIG. It becomes.

なお、以上の方法で目の位置が適正に検出されない原因としては、(i)目が画像中に存在しないこと、(ii)目は存在していても目が閉じられていたこと、(iii)目の位置が高速で移動したために目の画像がぶれたこと等がある。   Note that the reason why the eye position is not properly detected by the above method is that (i) the eye is not present in the image, (ii) the eye is present but the eye is closed, (iii) ) The image of the eye is blurred due to the eye moving at high speed.

目の位置候補から目の位置として特定したその位置は、当該フレームにおける目の位置として登録する。   The position specified as the eye position from the eye position candidates is registered as the eye position in the frame.

本発明において、目の位置の検出精度をあげる場合には、動画像を構成する各フレームについて、順次、上述したA.顔領域候補の検出、B.目の位置の検出、及び目の位置の検出の成否の判断を行うことが好ましい。   In the present invention, in order to increase the detection accuracy of the eye position, the above-described A.1. B. Detection of face area candidates; It is preferable to determine the detection of the eye position and the success or failure of the detection of the eye position.

一方、フレームレートに応じて、あるいは目の位置の検出目的に応じて、目の位置の検出処理速度を上げる場合には、以下の方法をとることができる。   On the other hand, in order to increase the eye position detection processing speed according to the frame rate or according to the eye position detection purpose, the following method can be used.

第1に、図1に示すように、一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームで、フレームNが直近で目の位置が特定されたフレームとなるときに、そのフレームNにおける目の位置の周辺領域を工程Bで使用する顔領域候補とし、工程Aの顔領域候補の検出に要する時間を短縮する。   First, as shown in FIG. 1, when the position of the eye is specified in one frame N, the frame immediately after to 3 seconds later is the frame in which the position of the eye is specified immediately after the frame N. Sometimes, the area around the eye position in the frame N is set as a face area candidate to be used in the process B, and the time required to detect the face area candidate in the process A is shortened.

ここで、一つのフレームNで目の位置が適正に検出された場合に、次のフレームN+1で目の位置の検出対象領域とする目の位置周辺の設定は、例えば、目と目の中間点を中心とする矩形であって、横方向が目と目の中心間距離の1.5〜3倍、好ましくは1.8〜2.2倍、縦方向が目と目の中心間距離の0.5〜2倍、好ましくは0.8〜1.2倍の範囲とすることが好ましい。   Here, when the eye position is properly detected in one frame N, the setting around the eye position as the detection target region of the eye position in the next frame N + 1 is, for example, an intermediate point between eyes The horizontal direction is 1.5 to 3 times, preferably 1.8 to 2.2 times the distance between the eyes and the center of the eyes, and the vertical direction is 0 to the center distance between the eyes and the eyes. .5 to 2 times, preferably 0.8 to 1.2 times.

なお、一つのフレームNで目の位置が特定された場合に、このフレームNの目の位置の周辺領域を目の位置の検出対称領域として使用するフレームを、フレームNの直後〜3秒後のフレームとするのは、目の位置の検出の成否において否と判断される原因の一つに、動画像において顔が激しい動きをしていることがあり、そのような激しい動きは、通常、1秒もないと推察されるためである。   When the position of the eye is specified in one frame N, a frame that uses the peripheral area of the eye position of the frame N as a detection symmetry area of the eye position is displayed immediately after the frame N to 3 seconds later. One of the reasons why the frame is determined to be a failure in the detection of the position of the eyes is that the face is moving violently in the moving image. This is because it is assumed that there is no second.

フレームNで目の位置が特定された後、その直後〜3秒後のフレームにおいて、フレームNの目の位置の周辺領域では目の位置が特定されなかった場合には、フレームの全領域を目の位置の検出対称領域とし、前述の工程Aの顔領域の検出から行う。   After the eye position is specified in the frame N, in the frame immediately after to 3 seconds later, if the eye position is not specified in the peripheral area of the eye position in the frame N, the entire area of the frame is checked. This is performed from the detection of the face area in step A described above.

これに対し、フレームNで目の位置が特定された後、その直後〜3秒後のフレームにおいて、フレームNの目の位置の周辺領域で目の位置が特定された場合には、その新たに特定された目の位置を登録し、その後のフレームでは、新たに登録した目の位置周辺のみを目の位置の検出対象領域として、上述と同様に目の位置を検出する。なお、フレームNの直後〜3秒後のフレームにおいて1カ所でも目の位置が特定されれば、それをそのフレームにおける目の位置として登録する。   On the other hand, after the eye position is specified in the frame N, if the eye position is specified in the peripheral region around the eye position of the frame N in the frame immediately after to 3 seconds after that, The specified eye position is registered, and in the subsequent frames, the eye position is detected in the same manner as described above using only the vicinity of the newly registered eye position as an eye position detection target region. If the position of the eye is specified even at one position in the frame immediately after the frame N to 3 seconds later, it is registered as the position of the eye in that frame.

また、イニシャルフレームにおいて、目の位置の特定が全くできなかった場合には、このフレームでは目の位置をこれ以上検出することなく次のフレームに進み、目の位置の検出を工程Aの顔領域の検出から行う。   In the initial frame, if the eye position could not be specified at all, the process proceeds to the next frame without further detecting the eye position in this frame, and the eye position is detected in the face area of step A. From the detection of.

目の位置の検出処理速度を上げる第2の方法としては、一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームでは、フレームNにおいて目の位置が特定された顔領域候補の最大サイズを顔画像サイズ枠とし、工程A(A2)で得た顔領域検出用画像上で顔画像サイズ枠を走査し、該枠内の中央部に比して周辺部が低明度となる領域を顔領域候補として検出し、以降の工程Bの目の位置の検出で使用する。   As a second method for increasing the detection processing speed of the eye position, when the eye position is specified in one frame N, the eye position is specified in the frame N in the frame immediately after to 3 seconds later. The face image size frame is scanned on the face area detection image obtained in step A (A2), and the peripheral portion is lower than the center portion in the frame. An area having brightness is detected as a face area candidate, and is used for detecting the eye position in the subsequent process B.

より具体的には、図17に示すように、工程A(A2)で得た顔領域検出用画像26上で顔画像サイズ枠35を走査させ、該枠内の中央部に比して周辺部が低明度となる枠領域35a〜35eを検出し、検出した枠領域35a〜35eを目の位置の検出対象とする顔領域候補として設定する。この顔画像サイズ枠35の走査では、例えば、顔画像サイズ枠35の一辺の長さをXピクセルとしたとき、1〜0.35Xピクセル、好ましくは0.2X〜0.3Xピクセル、より好ましくは0.23X〜0.27Xピクセルずつ縦横に移動させ、顔画像サイズ枠35を3×3の9領域に分割した場合に、以下の基準(1)〜(3)に基づいて顔領域候補を検出することが好ましい。   More specifically, as shown in FIG. 17, the face image size frame 35 is scanned on the face area detection image 26 obtained in step A (A2), and the peripheral portion is compared with the central portion in the frame. Frame areas 35a to 35e having low brightness are detected, and the detected frame areas 35a to 35e are set as face area candidates to be detected as eye positions. In the scanning of the face image size frame 35, for example, when the length of one side of the face image size frame 35 is X pixels, 1 to 0.35X pixels, preferably 0.2X to 0.3X pixels, more preferably 0.23X to When the face image size frame 35 is divided into 9 × 3 × 3 regions by moving the image vertically and horizontally by 0.27 × pixels, it is preferable to detect face region candidates based on the following criteria (1) to (3).

(1)画素値254以下の領域(白で無い領域)の存在割合が、中央部領域に比して周囲8領域での平均値が高い、
(2)画素値254以下の領域の存在割合が、中央部領域に比して上部中央領域で高い、
(3)画素値254以下の領域の存在割合が、中央部領域に比して中央部左領域又は中央部右領域で高い
(1) The existence ratio of regions having pixel values of 254 or less (regions that are not white) has a higher average value in the surrounding eight regions than the central region.
(2) The existence ratio of the region having a pixel value of 254 or less is higher in the upper central region than in the central region.
(3) The existence ratio of the region having a pixel value of 254 or less is higher in the central left region or the central right region than in the central region.

これらの基準のうち、(1)は、肌や髪の色が異なる人種を問わず、また、頭髪の有無も問わず、グレースケール画像では、顔領域が、頭、帽子、衣服、その他の顔領域の周囲に比して明るいことに基づくものであり、顔領域を検出するために必要な基準となる。   Of these criteria, (1) is for people with different skin and hair colors, with or without head hair, and in grayscale images, the face area is the head, hat, clothing, and other This is based on the fact that it is brighter than the surroundings of the face area, and is a reference necessary for detecting the face area.

(2)は、正面顔画像のように、画像上、顔の明るい領域の上方に頭髪の暗い領域が存在する場合、(3)は、横向の顔画像のように、画像上、顔の右側又は左側に髪の暗い領域が存在する場合に対応し、これらは(1)の条件だけでは、目の検出対象領域が過度に広く設定される場合に使用する。したがって、検出漏れ防止を優先目的とする場合は(1)の条件だけを満たす枠領域を検出することが好ましく、演算時間の短縮も目的とする場合は(1)と(2)を同時に満たす枠領域、又は(1)と(3)を同時に満たす枠領域を検出することが好ましい。   (2) is a front face image, when there is a dark region of head hair above the bright area of the face on the image, (3) is on the image, right side of the face, like a sideways face image Alternatively, this corresponds to the case where a dark region of hair exists on the left side, and these are used when the detection target region of the eye is set to be excessively wide only under the condition (1). Therefore, it is preferable to detect a frame area that satisfies only the condition (1) when priority is given to preventing detection omissions, and a frame that satisfies (1) and (2) at the same time if the purpose is to reduce the computation time. It is preferable to detect a region or a frame region that satisfies (1) and (3) simultaneously.

なお、上述の顔画像サイズ枠35の走査と顔領域候補の検出とは同時に行ってもよく、走査を完了させた後に顔領域候補を検出してもよい。   Note that the scan of the face image size frame 35 and the detection of the face area candidate may be performed at the same time, or the face area candidate may be detected after the scan is completed.

この顔画像サイズ枠35の走査による顔領域候補の検出方法は、その枠サイズが、フレームNにおいて目の位置が特定された顔領域候補のサイズに依存する点で、工程Aの水平・垂直のぼかし画像の作成から始める顔領域候補の検出に比べると、検出精度が低いが、短時間に顔領域候補を検出することができる。   The face area candidate detection method by scanning the face image size frame 35 is that the frame size depends on the size of the face area candidate whose eye position is specified in the frame N. Although the detection accuracy is low as compared with detection of a face area candidate starting from creation of a blurred image, the face area candidate can be detected in a short time.

一方、目の位置の検出精度をより高める方法としては、一つのフレームNで目の位置が特定された場合に、次のフレームN+1では、フレームNにおいて目の位置が特定された顔領域候補を工程Bで使用する顔領域候補とすると共に、フレームNにおいて目の位置が特定された顔領域候補をフレームN+1の元画像から除いた画像から顔領域候補を検出することが好ましい。一般に、フレームNで目の位置が特定された場合には、フレームN+1においても、同領域に目の位置が特定されることが多いので、この方法によれば、フレームN+1において、フレームNにおける目の位置を確認しつつ目の位置を検出するので、目の位置の検出精度を高めることができる。   On the other hand, as a method for improving the detection accuracy of the eye position, when the eye position is specified in one frame N, in the next frame N + 1, the face area candidate whose eye position is specified in the frame N is selected. It is preferable to detect the face area candidate from the image obtained by removing the face area candidate whose eye position is specified in the frame N from the original image of the frame N + 1, as the face area candidate used in the process B. In general, when the position of the eye is specified in the frame N, the position of the eye is often specified in the same region in the frame N + 1. According to this method, the eye in the frame N is specified in the frame N + 1. Since the eye position is detected while checking the position of the eye, the detection accuracy of the eye position can be improved.

本発明において、画像のサイズやフレームレートにより、目の位置の検出がフレームの転送に追いつかない場合には、所定のフレーム数毎に目の位置の検出を行えばよい。   In the present invention, when the detection of the eye position cannot catch up with the transfer of the frame due to the size of the image or the frame rate, the eye position may be detected every predetermined number of frames.

目の位置が適正に検出されなかったフレームや、所定のフレーム数ごとに目の位置の検出を行うために目の位置を検出していないフレームでは、画像の内容や目の位置の検出目的に応じて、目の位置が検出されているフレームにおける目の位置を補完することにより目の位置を特定してもよく、また、目の位置が検出されていないフレームはディスプレイに表示しないようにしてもよい。   For the purpose of detecting the contents of the image and the eye position in the frame where the eye position is not properly detected or in the frame where the eye position is not detected to detect the eye position every predetermined number of frames. Accordingly, the eye position may be specified by complementing the eye position in the frame in which the eye position is detected, and the frame in which the eye position is not detected is not displayed on the display. Also good.

また、本発明においては、工程B(B4)で目の位置を特定した後、工程B(B5)でその目の位置に対応する顔領域候補に基づいて顔領域を特定することにより、元画像中の顔領域の位置も検出することができる。この場合、特定した目の位置に対応する顔領域候補の矩形領域をそのまま顔領域とする必要はなく、元画像において顔領域を特定する目的に応じて、検出した目の位置を含む多角形領域としてもよく、円形領域としてもよく、肌色領域としてもよい。ここで、顔領域の大きさは、検出した両目の間隔や顔領域候補の大きさ等に応じて、適宜設定しておくことができる。また、各顔領域候補において目の位置の検出に加え、フェードイン法を用いて口や鼻の位置も検出し(画像の認識・理解シンポジウム(MIRU2006),論文集CD-ROM,IS1-18「顔パーツ(髪・眉・目・鼻・口)検出の高精度化と実用化」,2006.7.19.発行)、少なくとも、目の他に鼻又は口が含まれる領域を顔領域としてもよい。   In the present invention, after specifying the position of the eye in step B (B4), the face region is specified based on the face region candidate corresponding to the position of the eye in step B (B5). The position of the inside face area can also be detected. In this case, the rectangular area of the face area candidate corresponding to the specified eye position does not need to be used as the face area as it is, but a polygon area including the detected eye position according to the purpose of specifying the face area in the original image. Or a circular region or a flesh-colored region. Here, the size of the face region can be appropriately set according to the detected distance between both eyes, the size of the face region candidate, and the like. In addition to detecting the position of eyes in each face region candidate, the position of the mouth and nose is also detected using the fade-in method (Image Recognition and Understanding Symposium (MIRU2006), Proceedings CD-ROM, IS1-18 “ Face parts (hair, eyebrows, eyes, nose, mouth) are highly accurate and put into practical use ", published 2006.7.19), and at least an area that includes the nose or mouth in addition to the eyes may be used as the face area.

また、目の位置に対応する顔領域であって、大きさあるいは位置のずれているものが複数重なり合っている場合には、これらの和領域に基づいて顔領域を定めてもよい。例えば、元画像において顔領域のモザイク処理を目的とする場合には、本来の顔領域に確実にモザイク処理を施すため、和領域に基づくことが好ましい。   In addition, when a plurality of face areas corresponding to the position of the eye and having different sizes or positions are overlapped, the face area may be determined based on these sum areas. For example, when the purpose is to perform mosaic processing of the face area in the original image, it is preferable to use the sum area in order to reliably perform mosaic processing on the original face area.

本発明の目の位置の検出方法及び顔領域の位置の検出方法は、複数の顔画像において、目の位置の検出対象とする個々の被写体の肌の色、瞳の色、顔の向き、照明環境の変化によらず、精度よく、簡便な演算方法で、高い処理速度で目の位置を検出することができる。したがって、白人、黒人を問わず、複数顔画像から目の位置を検出することができる。   The eye position detection method and face region position detection method according to the present invention include a skin color, a pupil color, a face orientation, and an illumination of each subject to be detected as an eye position in a plurality of face images. Regardless of environmental changes, the eye position can be detected at high processing speed with a simple and accurate calculation method. Therefore, it is possible to detect the position of the eyes from a plurality of face images regardless of whites or blacks.

本発明により検出された目の位置は、髪型シミュレーション画像を形成する場合、化粧シミュレーション画像を形成する場合、顔画像の目隠し処理をする場合、顔画像のフレーム処理をする場合、個人認証用画像を作成する場合など、目の位置の検出が必要とされる種々の場面で利用することができる。   The positions of the eyes detected by the present invention are the following: when forming a hairstyle simulation image, when forming a makeup simulation image, when performing face image blindfold processing, when performing face image frame processing, It can be used in various scenes where the detection of the eye position is required, such as when creating.

また、本発明により検出された顔領域の位置も、顔画像の目隠し処理をする場合、デジタルカメラ撮影時の顔色補正又は撮影画像の顔色補正をする場合、プリンタ印刷時の顔色補正をする場合等で利用することができる。   In addition, the position of the face area detected by the present invention is also applied to the case where the face image is blindfolded, the face color correction at the time of digital camera shooting or the face color correction of the shot image, the face color correction at the time of printer printing, Can be used.

動画像における目の位置及び顔領域の位置の検出方法の流れ図である。It is a flowchart of the detection method of the position of the eye in the moving image, and the position of a face area. 目の位置及び顔領域の位置の検出システムのブロック図である。It is a block diagram of the detection system of the position of eyes and the position of a face area. 明度補正の説明図である。It is explanatory drawing of brightness correction. 明度補正の説明図である。It is explanatory drawing of brightness correction. 前処理前の元画像と前処理後の元画像である。An original image before preprocessing and an original image after preprocessing. 水平ぼかし画像、垂直ぼかし画像、水平・垂直ぼかし画像である。They are a horizontal blur image, a vertical blur image, and a horizontal / vertical blur image. 水平・垂直ぼかし画像から検出した水平エッジと垂直エッジの画像である。It is an image of a horizontal edge and a vertical edge detected from a horizontal / vertical blurred image. 斜め2方向のぼかし画像である。It is a blurred image in two diagonal directions. 顔領域検出用画像(ポジ画像)である。It is a face area detection image (positive image). 顔領域検出用画像(ネガ画像)である。It is a face area detection image (negative image). 顔領域候補の検出のための、水平エッジと垂直エッジの交点を基点とする正方形の説明図である。It is explanatory drawing of the square which makes the base point the intersection of a horizontal edge and a vertical edge for the detection of a face area candidate. 顔領域候補の検出条件の説明図である。It is explanatory drawing of the detection conditions of a face area | region candidate. 顔領域検出用画像中に顔領域候補を示した図である。It is the figure which showed the face area candidate in the image for face area detection. 顔領域候補の明度を変化させた目の位置検出用画像である。It is an eye position detection image in which the brightness of a face area candidate is changed. ある階層のフェードイン画像に、目の位置候補を示した図である。It is the figure which showed the position candidate of the eye to the fade-in image of a certain hierarchy. ある階層の目の位置検出用画像において、全階層にわたる目の位置候補を集積して表示した図である。It is the figure which accumulated and displayed the eye position candidate over all the hierarchies in the eye position detection image of a certain hierarchy. 特定した目の位置を顔領域候補に表示した図である。It is the figure which displayed the position of the specified eye on the face area candidate. 検出した目の位置と顔領域の位置を元画像に重ねた図である。It is the figure which superimposed the position of the detected eye and the position of the face area on the original image. 顔領域検出用画像で顔画像サイズ枠を走査させることにより顔領域候補を検出する方法の説明図である。It is explanatory drawing of the method of detecting a face area candidate by scanning a face image size frame with the image for face area detection.

符号の説明Explanation of symbols

1 撮像装置
2 パソコン本体
3 ディスプレイ
4 プリンタ
10 目及び顔の位置の検出システム
20 元画像
21 前処理後の元画像
22 水平ぼかし画像
23 垂直ぼかし画像
24 水平・垂直ぼかし画像
25 水平・垂直エッジ画像
26 顔領域検出用画像
30 微小な正方形
31 拡大を停止した正方形
32a、32b、32c 長方形
33 顔領域候補
35 顔画像サイズ枠
P 水平・垂直ぼかし画像における水平エッジと垂直エッジの交点
DESCRIPTION OF SYMBOLS 1 Imaging device 2 Personal computer body 3 Display 4 Printer 10 Eye and face position detection system 20 Original image 21 Pre-processed original image 22 Horizontal blurred image 23 Vertical blurred image 24 Horizontal / vertical blurred image 25 Horizontal / vertical edge image 26 Face area detection image 30 Minute square 31 Squares 32a, 32b, and 32c that have stopped being expanded Rectangular 33 Face area candidate 35 Face image size frame P Intersection of horizontal edge and vertical edge in horizontal / vertical blurred image

Claims (16)

動画像において目の位置を検出する方法であって、
A.(A1)動画像のフレーム(以下、元画像とも称する)から交差する2方向にぼかしたぼかし画像を作成し、該ぼかし画像におけるぼかし方向のエッジの交点の位置を求めると共に、
(A2)元画像の階調をつぶした顔領域検出用画像を作成し、
(A3)顔領域検出用画像において、ぼかし方向のエッジの交点を一つの頂点とする矩形領域であって、その左右及び上の隣接領域に比して明度が高い領域を、顔領域候補として検出する工程、
B.(B1)顔領域候補ごとに、明度が変化した複数の目の位置検出用画像を作成し、
(B2)目の位置検出用画像が高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出し、
(B3)検出した画素の固まり領域のうち対となって現れたものを目の位置候補として選択し、
(B4)各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置候補を目の位置として特定する工程、
を有する目の位置の検出方法。
A method for detecting an eye position in a moving image,
A. (A1) Create a blurred image blurred in two directions intersecting from a moving image frame (hereinafter also referred to as an original image), determine the position of the intersection of the edges in the blurred direction in the blurred image,
(A2) Create a face area detection image with the gradation of the original image collapsed,
(A3) In the face area detection image, a rectangular area having an intersection of edges in the blur direction as one vertex and having a higher brightness than the left and right and upper adjacent areas is detected as a face area candidate. The process of
B. (B1) For each face area candidate, create a plurality of eye position detection images with varying brightness,
(B2) As the eye position detection image fades in from a state of fading out at a high brightness to a low brightness, a cluster area of pixels that gradually appears in the eye position detection image is detected,
(B3) Select the clustered areas of the detected pixels that appeared in pairs as eye position candidates,
(B4) specifying the eye position candidate as the eye position based on the appearance frequency over all eye position detection images of each eye position candidate;
A method for detecting the position of an eye.
一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームで、フレームNが直近で目の位置が特定されたフレームとなるときに、該フレームNにおける目の位置の周辺領域を、工程Bで使用する顔領域候補とする請求項1記載の目の位置の検出方法。   When the eye position is specified in one frame N, the frame immediately after to 3 seconds later, when the frame N is the most recently specified frame, the position of the eye in the frame N is determined. The eye position detection method according to claim 1, wherein the peripheral area is a face area candidate used in step B. 一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームで、フレームNにおいて目の位置が特定された顔領域候補の最大サイズを顔画像サイズ枠とし、工程A(A2)により作成した顔領域検出用画像上で顔画像サイズ枠を走査し、該枠内の中央部に比して周辺部が低明度となる領域を、工程Bで使用する顔領域候補として検出する請求項1記載の目の位置の検出方法。   When the eye position is specified in one frame N, the maximum size of the face region candidate whose eye position is specified in frame N in the frame immediately after to 3 seconds later is set as the face image size frame, and the process A ( The face image size frame is scanned on the face area detection image created in A2), and the area where the peripheral part is lighter than the central part in the frame is detected as the face area candidate used in step B. The method for detecting an eye position according to claim 1. 一つのフレームNで目の位置が特定された場合に次のフレームN+1で、フレームNにおいて目の位置が特定された顔領域候補を、工程Bで使用する顔領域候補とすると共に、フレームNにおいて目の位置が特定された顔領域候補をフレームN+1の元画像から除いた画像から工程Aにより顔領域候補を検出する請求項1記載の目の位置の検出方法。   When the eye position is specified in one frame N, the face area candidate whose eye position is specified in frame N in the next frame N + 1 is set as the face area candidate used in step B. The method of detecting an eye position according to claim 1, wherein the face area candidate is detected in step A from an image obtained by removing the face area candidate whose eye position is specified from the original image of the frame N + 1. 工程A(A2)において、明度補正をした元画像から顔領域検出用画像を作成する請求項1〜4のいずれかに記載の目の位置の検出方法。   The method of detecting an eye position according to any one of claims 1 to 4, wherein, in step A (A2), a face area detection image is created from an original image that has undergone lightness correction. 工程A(A2)において、元画像が256階調の場合に、フェードイン0%の画像は全ての画素が画素値255を有し、フェードインx%の画像(但し、x>0)は、元画像において画素値が2.55x未満の画素は元画像の画素値を有し、画素値が2.55x以上の画素は一律画素値255を有するとしたときに、顔領域検出用画像として、元画像に対してフェードイン25〜35%の画像を形成する請求項1〜5のいずれかに記載の目の位置の検出方法。   In step A (A2), when the original image has 256 gradations, an image with 0% fade-in has all pixels having a pixel value of 255, and an image with fade-in x% (where x> 0) A pixel having a pixel value less than 2.55x in the original image has a pixel value of the original image, and a pixel having a pixel value of 2.55x or more has a uniform pixel value 255. The eye position detection method according to claim 1, wherein an image having a fade-in of 25 to 35% is formed with respect to the original image. 交差する2方向を水平方向と垂直方向とする請求項1〜6のいずれかに記載の目の位置の検出方法。   The method for detecting an eye position according to claim 1, wherein two intersecting directions are a horizontal direction and a vertical direction. 工程A(A3)において、水平エッジと垂直エッジの交点を一つの頂点とする微小な正方形を想定し、その交点を基点として正方形を次の(a)又は(b)の条件が満たされるまで右下方向、左下方向、右上方向及び左上方向にそれぞれ拡大し、
(a)正方形内で画素値255のピクセルの割合が60%を以上となった後に60%未満になったとき
(b)正方形の拡大方向の線幅1ピクセルの縦辺又は下辺において、画素値254以下のピクセルの割合が、1/3以下になった後に1/3以上になったとき
拡大を停止した時点の正方形の左右及び上に隣接する領域で、それぞれ正方形の一辺を長辺とし、正方形の一辺の1/3〜1/2の長さを短辺とする長方形を想定し、これらの長方形について、次の(p)又は(q)の条件が満たされるものを顔領域候補とする請求項7記載の目の位置の検出方法。
(p)全ピクセルの10%以上が画素値254以下である
(q)長方形の正方形側の長辺の長さの1/3以上のピクセルが画素値254以下である
In step A (A3), assume a small square with the intersection of the horizontal edge and the vertical edge as one vertex, and use the intersection as a base point until the next condition (a) or (b) is satisfied. Expand downward, lower left, upper right and upper left,
(a) When the proportion of pixels having a pixel value of 255 in the square becomes more than 60% and then becomes less than 60%
(b) When the expansion stops when the ratio of pixels with a pixel value of 254 or less becomes 1/3 or less after the ratio of the pixel value of 254 or less in the vertical or lower side of the line width of 1 pixel in the square enlargement direction Assuming rectangles having one side of the square as a long side and a length of 1/3 to 1/2 of one side of the square as a short side, The eye position detection method according to claim 7, wherein a face region candidate satisfying the following condition (p) or (q) is used.
(p) 10% or more of all pixels have a pixel value of 254 or less
(q) Pixels having a length equal to or more than 1/3 of the long side of the rectangular square have a pixel value of 254 or less
請求項1〜8のいずれかに記載の方法で目の位置を特定した後、その目の位置に対応する顔領域候補に基づいて顔領域を特定する顔領域の位置の検出方法。   A method for detecting the position of a face area, which specifies a face area based on a face area candidate corresponding to the eye position after the eye position is specified by the method according to claim 1. 動画像の取得手段、及び演算手段を備えた目の位置の検出システムであって、演算手段が、
元画像から交差する2方向にぼかしたぼかし画像を作成する機能、該ぼかし画像のぼかし方向のエッジを検出し、それらの交点の位置を求める機能、元画像の階調をつぶした顔領域検出用画像を作成する機能、顔領域検出用画像において、ぼかし方向のエッジの交点を一つの頂点とする矩形領域であって、その左右及び上の隣接領域に比して明度が高い領域を顔領域候補として検出する機能、顔領域候補ごとに、目の位置検出用画像として明度が変化した複数の画像を作成する機能、その画像が高明度でフェードアウトした状態から低明度へフェードインするのに伴い、目の位置検出用画像に漸次現れる画素の固まり領域を検出する機能、検出した画素の固まり領域のうち対となって現れたものを目の位置候補として選択する機能、及び各目の位置候補の全ての目の位置検出用画像にわたる出現度数に基づいて目の位置を特定する機能を備えている目の位置の検出システム。
An eye position detection system including a moving image acquisition unit and a calculation unit, wherein the calculation unit includes:
A function that creates a blurred image that is blurred in two directions intersecting with the original image, a function that detects edges in the blur direction of the blurred image and finds the position of those intersections, and a face area detection that collapses the gradation of the original image Image creation function, a face area detection image is a rectangular area whose intersection is the intersection of edges in the blur direction and has a higher brightness than the adjacent areas on the left and right and above As a function to create a plurality of images whose brightness has changed as eye position detection images for each face area candidate, as the image fades out from a state of fading out with high brightness to low brightness, A function for detecting a cluster area of pixels that gradually appear in the eye position detection image, a function for selecting a pair of detected pixel cluster areas that appear as a pair, and each eye The position detection system of the position of the eye has a function of specifying the position of the eye based on the occurrence frequency over position detecting images of all eye candidates.
一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームで、フレームNが直近で目の位置が特定されたフレームとなるときに、該フレームNにおける目の位置の周辺領域を顔領域候補とする機能を備えた請求項10記載の目の位置の検出システム。   When the eye position is specified in one frame N, the frame immediately after to 3 seconds later, and when the frame N is the most recently specified frame, the position of the eye in the frame N is determined. The eye position detection system according to claim 10, further comprising a function of setting a peripheral area as a face area candidate. 一つのフレームNで目の位置が特定された場合にその直後〜3秒後のフレームで、フレームNにおいて目の位置が特定された顔領域候補の最大サイズを顔画像サイズ枠とし、顔領域検出用画像上で顔画像サイズ枠を走査し、該枠内の中央部に比して周辺部が低明度となる領域を顔領域候補として検出する機能を備えた請求項10記載の目の位置の検出システム。   When the eye position is specified in one frame N, the face area detection is performed using the maximum size of the face area candidate whose eye position is specified in frame N as the face image size frame in the frame immediately after to 3 seconds later. The position of the eye position according to claim 10, comprising a function of scanning a face image size frame on the image for detection and detecting, as a face region candidate, a region whose peripheral portion has a lower brightness than the central portion in the frame. Detection system. 一つのフレームNで目の位置が特定された場合に、次のフレームN+1で、フレームNにおいて目の位置が特定された顔領域候補を顔領域候補とすると共に、フレームNにおいて目の位置が特定された顔領域候補をフレームN+1の元画像から除いた画像から顔領域候補を検出する機能を備えた請求項10記載の目の位置の検出システム。   When the eye position is specified in one frame N, in the next frame N + 1, the face area candidate whose eye position is specified in frame N is set as a face area candidate, and the eye position in frame N is specified. The eye position detection system according to claim 10, further comprising a function of detecting a face area candidate from an image obtained by removing the face area candidate from the original image of frame N + 1. 交差する2方向を水平方向と垂直方向とする請求項10〜13のいずれかに記載の目の位置の検出システム。   The system for detecting an eye position according to claim 10, wherein two intersecting directions are a horizontal direction and a vertical direction. 動画像の取得手段が、動画像が撮影可能なカメラである請求項10〜14のいずれかに記載の目の位置の検出システム。   15. The eye position detection system according to claim 10, wherein the moving image acquisition means is a camera capable of shooting a moving image. 動画像の取得手段、及び演算手段を備えた顔領域の位置の検出システムであって、演算手段が、請求項10〜15のいずれかに記載の演算手段の機能、及び顔領域候補のうち目の位置が特定されたものに基づいて顔領域を特定する機能を有する顔領域の位置の検出システム。   16. A system for detecting a position of a face area comprising a moving image acquisition means and a calculation means, wherein the calculation means includes a function of the calculation means according to claim 10 and an eye among face area candidates. A face area position detection system having a function of identifying a face area based on the position of the face.
JP2008176154A 2008-07-04 2008-07-04 Eye position detection method Expired - Fee Related JP4775599B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008176154A JP4775599B2 (en) 2008-07-04 2008-07-04 Eye position detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008176154A JP4775599B2 (en) 2008-07-04 2008-07-04 Eye position detection method

Publications (2)

Publication Number Publication Date
JP2010015463A true JP2010015463A (en) 2010-01-21
JP4775599B2 JP4775599B2 (en) 2011-09-21

Family

ID=41701517

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008176154A Expired - Fee Related JP4775599B2 (en) 2008-07-04 2008-07-04 Eye position detection method

Country Status (1)

Country Link
JP (1) JP4775599B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222674A (en) * 2015-07-14 2019-09-10 原相科技股份有限公司 Eye state method for detecting and eye state detecting system
JP2019169023A (en) * 2018-03-26 2019-10-03 カシオ計算機株式会社 Image processing apparatus, image processing method, and program therefor
JP7421525B2 (en) 2021-08-27 2024-01-24 株式会社モリタ製作所 Image processing device, image processing system, image processing method, image processing program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048184A (en) * 1998-05-29 2000-02-18 Canon Inc Method for processing image, and method for extracting facial area and device therefor
JP2007200289A (en) * 2005-12-28 2007-08-09 Kao Corp Method for detection of location of eye

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048184A (en) * 1998-05-29 2000-02-18 Canon Inc Method for processing image, and method for extracting facial area and device therefor
JP2007200289A (en) * 2005-12-28 2007-08-09 Kao Corp Method for detection of location of eye

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222674A (en) * 2015-07-14 2019-09-10 原相科技股份有限公司 Eye state method for detecting and eye state detecting system
JP2019169023A (en) * 2018-03-26 2019-10-03 カシオ計算機株式会社 Image processing apparatus, image processing method, and program therefor
JP7110657B2 (en) 2018-03-26 2022-08-02 カシオ計算機株式会社 Image processing device, image processing method and program
JP7421525B2 (en) 2021-08-27 2024-01-24 株式会社モリタ製作所 Image processing device, image processing system, image processing method, image processing program

Also Published As

Publication number Publication date
JP4775599B2 (en) 2011-09-21

Similar Documents

Publication Publication Date Title
US8131013B2 (en) Method and detecting system for positions of facial parts
JP4307496B2 (en) Facial part detection device and program
US8331619B2 (en) Image processing apparatus and image processing method
JP4845698B2 (en) Eye detection device, eye detection method, and program
US8285002B2 (en) Image processing apparatus and method, image sensing apparatus, and program
US20090123063A1 (en) Detecting Redeye Defects in Digital Images
US8295593B2 (en) Method of detecting red-eye objects in digital images using color, structural, and geometric characteristics
US9396411B2 (en) Method and system for generating intrinsic images using a single reflectance technique
US20200389573A1 (en) Image processing system, image processing method and storage medium
CN103218615B (en) Face judgment method
JP2004005384A (en) Image processing method, image processing device, program, recording medium, automatic trimming device and picture-taking arrangement
CN109716355A (en) Grain boundaries identification
JP4775599B2 (en) Eye position detection method
US9754155B2 (en) Method and system for generating intrinsic images using a single reflectance technique
JP5338762B2 (en) White balance coefficient calculation device and program
JP4683236B2 (en) Eye position detection method
JP4530173B2 (en) Method and system for detecting the position of a facial part
JP4831344B2 (en) Eye position detection method
CN104112266B (en) Image edge blurring detecting method and device
JP5093540B2 (en) Eye position detection method and detection system
JP4831361B2 (en) Eye position detection method and detection system
JP2007048108A (en) Image evaluation system, image evaluation method and image evaluation program
JP2005165983A (en) Method for detecting jaw of human face, jaw detection system, and jaw detection program
JP3963789B2 (en) Eye detection device, eye detection program, recording medium for recording the program, and eye detection method
JP2010146159A (en) Eyelid detection apparatus, eyelid detection method, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110418

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110601

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110614

R151 Written notification of patent or utility model registration

Ref document number: 4775599

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20140708

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees