JP4739870B2 - Sunglasses detection device and face center position detection device - Google Patents

Sunglasses detection device and face center position detection device Download PDF

Info

Publication number
JP4739870B2
JP4739870B2 JP2005257168A JP2005257168A JP4739870B2 JP 4739870 B2 JP4739870 B2 JP 4739870B2 JP 2005257168 A JP2005257168 A JP 2005257168A JP 2005257168 A JP2005257168 A JP 2005257168A JP 4739870 B2 JP4739870 B2 JP 4739870B2
Authority
JP
Japan
Prior art keywords
sunglasses
white
face
black
face image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005257168A
Other languages
Japanese (ja)
Other versions
JP2007072627A (en
Inventor
純也 春日井
剛 内藤
博 石黒
健一 大上
重康 魚住
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Aisin Corp
Original Assignee
Aisin Seiki Co Ltd
Toyota Motor Corp
Aisin 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 Aisin Seiki Co Ltd, Toyota Motor Corp, Aisin Corp filed Critical Aisin Seiki Co Ltd
Priority to JP2005257168A priority Critical patent/JP4739870B2/en
Publication of JP2007072627A publication Critical patent/JP2007072627A/en
Application granted granted Critical
Publication of JP4739870B2 publication Critical patent/JP4739870B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、顔画像からサングラスの画像を検出するサングラス検出装置と、サングラスが検出された場合でも的確に顔の中心位置を検出することができる顔中心位置検出装置に関する。   The present invention relates to a sunglasses detection apparatus that detects an image of sunglasses from a face image, and a face center position detection apparatus that can accurately detect the center position of a face even when sunglasses are detected.

顔画像に基づいて人を識別したり、表情を読み取ったりするためには、顔の位置や顔の中心位置、向きなどを検出することが重要となる。   In order to identify a person or read a facial expression based on a face image, it is important to detect the face position, the face center position, the orientation, and the like.

例えば、特許文献1には、人の顔を撮影した画像を処理し、人の動きや背景に影響されること無く高精度に顔の位置を検出する手法が開示されている。   For example, Patent Document 1 discloses a technique for processing an image obtained by photographing a human face and detecting the position of the face with high accuracy without being affected by the movement or background of the person.

また、特許文献2には、ドライバーが存在可能な領域を撮影して得られた画像を取り込み、取り込んだ画像から横エッジ画像を検出し、検出した横エッジ画像において、顔の中心線の候補線としての複数の顔中心候補線を設定すると共に複数の顔中心候補線各々に対して、該顔中心候補線が顔の中心線である確からしさを表す値に基づいて、顔の有無の判定精度を向上する技術が開示されている。
特開2004−310396号公報 特開2005−011097号公報
Further, Patent Document 2 captures an image obtained by photographing an area where a driver can exist, detects a lateral edge image from the captured image, and detects a candidate line for a face center line in the detected lateral edge image. A plurality of face center candidate lines, and for each of the plurality of face center candidate lines, based on a value indicating the probability that the face center candidate line is the face center line, the presence / absence determination accuracy of the face Techniques for improving the above are disclosed.
JP 2004-310396 A JP 2005-011097 A

ドライバーは、サングラスをかけることが多い。特許文献1及び2に開示された技術では、サングラスのレンズ部分のサイズが通常の目に比較して大きいため、検出される顔の位置や顔の中心線の位置が正確な位置からずれてしまう。   Drivers often wear sunglasses. In the techniques disclosed in Patent Documents 1 and 2, since the size of the lens portion of the sunglasses is larger than that of a normal eye, the position of the detected face and the position of the center line of the face deviate from the accurate positions. .

本発明は上記の問題点に鑑みてなされたものであり、人物画像からサングラスの有無を判別することを可能とすることを目的とする。
また、本発明は、サングラスをかけた人物画像から顔の位置・中心位置などを判別することを可能とすることを目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to make it possible to determine the presence or absence of sunglasses from a person image.
Another object of the present invention is to make it possible to discriminate the position and center position of a face from a person image wearing sunglasses.

上記目的を達成するため、この発明のサングラス検出装置は、
顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、
前記顔画像記憶手段に記憶された前記顔画像について、サングラスのレンズ部分のサイズに合わせた所定数黒画素が連続する白黒白エッジ検出処理を実行するエッジ検出手段と、
前記エッジ検出手段により検出されたエッジに基づいて、顔画像のサングラスの画像の有無を判別するサングラス検出手段と、
を備える、ことを特徴とする。
In order to achieve the above object, the sunglasses detection apparatus of the present invention is
Face image storage means for storing a face image obtained by photographing a face;
Edge detection means for performing black and white white edge detection processing in which a predetermined number of black pixels are matched to the size of the lens portion of sunglasses for the face image stored in the face image storage means;
Sunglasses detecting means for determining the presence or absence of an image of sunglasses of a face image based on the edge detected by the edge detecting means;
It is characterized by comprising.

前記エッジ検出手段は、例えば、前記顔画像記憶手段に記憶された前記顔画像の目の検出予定位置の画像データについて、サングラスのレンズ部分のサイズに合わせた白黒白エッジ検出処理を実行する。   The edge detection unit performs, for example, a monochrome white edge detection process in accordance with the size of the lens portion of the sunglasses on the image data of the eye detection planned position of the face image stored in the face image storage unit.

前記エッジ検出手段は、例えば、前記サングラスのレンズ部分のサイズに合わせた白黒白横エッジ又は白黒白縦エッジを前記顔画像から検出する第1の画像処理を実行する第1の画像処理手段と、前記第1の画像処理手段により処理された顔画像から、前記サングラスのレンズ部分のサイズに合わせた白黒白縦エッジ又は白黒白横エッジを検出する第2の画像処理を実行する第2の画像処理手段と、を備える。   The edge detection means includes, for example, a first image processing means for executing a first image processing for detecting a black and white white horizontal edge or a black and white white vertical edge that matches a size of a lens portion of the sunglasses from the face image; Second image processing for executing second image processing for detecting black and white white vertical edges or black and white white horizontal edges in accordance with the size of the lens portion of the sunglasses from the face image processed by the first image processing means Means.

前記顔画像記憶手段に記憶された前記顔画像について、目の画像データを検出する目検出手段をさらに配置し、前記エッジ検出手段は、前記目検出手段による目の検出ができなかったときに、サングラスのレンズ部分のサイズに合わせた白黒白エッジ検出処理を実行するように構成してもよい。   For the face image stored in the face image storage means, an eye detection means for detecting eye image data is further arranged, and when the edge detection means cannot detect the eye by the eye detection means, You may comprise so that the black-and-white white edge detection process matched with the size of the lens part of sunglasses may be performed.

例えば、前記顔画像記憶手段は、時系列的に顔を撮影して得られた画像を順次記憶し、前記エッジ検出手段は、前記顔画像記憶手段に記憶された複数の画像についてエッジ検出処理を実行し、前記サングラス検出手段は、複数の画像についてのエッジ検出処理の結果に基づいて、サングラスの有無を検出する。   For example, the face image storage means sequentially stores images obtained by photographing faces in time series, and the edge detection means performs edge detection processing on a plurality of images stored in the face image storage means. The sunglasses detecting means detects the presence / absence of sunglasses based on the result of edge detection processing for a plurality of images.

顔画像を撮影して前記顔画像記憶手段に供給するための赤外線カメラを配置してもよい。   An infrared camera for photographing a face image and supplying it to the face image storage means may be arranged.

この発明の第2の観点に係る顔中心判別装置は、上述のサングラス検出装置と、このサングラス検出装置によりサングラスが検出された場合に、想定される目の位置とサイズに基づいて、顔の中心を判別する手段とを備える。   According to a second aspect of the present invention, there is provided a face center discriminating apparatus, and the center of the face based on the assumed position and size of the eye when sunglasses are detected by the sunglasses detecting apparatus and the sunglasses detecting apparatus. And means for discriminating.

顔中心判定手段は、例えば、サングラス検出装置により検出されたサングラスの位置に基づいて目の位置を推定し、推定した目の位置に基づいて、顔の中心を判別する。   For example, the face center determination unit estimates the position of the eye based on the position of the sunglasses detected by the sunglasses detection device, and determines the center of the face based on the estimated position of the eye.

顔中心判定手段は、例えば、サングラス検出装置により検出されたサングラスの位置に基づいて前記サングラスを含む顔画像にサングラスを含まない目の画像を合成し、合成画像に基づいて、顔の中心を判別する。
顔中心判定手段は、例えば、合成画像に含まれる顔の各部の重心を求める。
The face center determining means, for example, synthesizes an eye image not including sunglasses with a face image including sunglasses based on the position of the sunglasses detected by the sunglasses detection device, and determines the center of the face based on the combined image. To do.
For example, the face center determination unit obtains the center of gravity of each part of the face included in the composite image.

また、この発明の第3の観点に係るコンピュータプログラムは、コンピュータを、顔を撮影して得られた顔画像を記憶する顔画像記憶手段、前記顔画像記憶手段に記憶された前記顔画像について、サングラスのレンズ部分のサイズに合わせた所定数黒画素が連続する白黒白エッジ検出処理を実行するエッジ検出手段、前記エッジ検出手段により検出されたエッジに基づいて、顔画像のサングラスの画像の有無を判別するサングラス検出手段、として機能させることを特徴とする。 Further, a computer program according to a third aspect of the present invention relates to a face image storage means for storing a face image obtained by photographing a face of a computer, and the face image stored in the face image storage means. Edge detection means for performing black and white white edge detection processing in which a predetermined number of black pixels according to the size of the lens portion of the sunglasses are continuous, and based on the edge detected by the edge detection means, the presence or absence of the sunglasses image of the face image It is made to function as a sunglasses detection means to discriminate | determine.

この発明によれば、顔画像からサングラスを検出することができる。また、この発明によれば、サングラスの検出に基づいて顔の中心を求めることができる。   According to this invention, sunglasses can be detected from a face image. According to the present invention, the center of the face can be obtained based on the detection of sunglasses.

以下、本発明の実施形態に係るサングラス検出機能を備える顔中心位置検出装置について説明する。   Hereinafter, a face center position detection device having a sunglasses detection function according to an embodiment of the present invention will be described.

本実施形態の顔中心位置装置は、図1に示すように、ドライバーの顔を撮影して顔画像を生成するカメラ10と、ドライバーの顔を照明する照明光源12と、ドライバーの顔中心位置を検出するコンピュータ14と、コンピュータ14に接続された表示装置16とを備える。   As shown in FIG. 1, the face center position apparatus of the present embodiment captures a driver's face and generates a face image, a camera 10, an illumination light source 12 that illuminates the driver's face, and the driver's face center position. The computer 14 to detect and the display apparatus 16 connected to the computer 14 are provided.

カメラ10は例えばCCDカメラ等から構成され、ドライバーの顔の階調画像を取得する。カメラ10によって生成される顔画像は、ドライバーの顔だけでなく、その背景なども含まれている。   The camera 10 is composed of a CCD camera, for example, and acquires a gradation image of the driver's face. The face image generated by the camera 10 includes not only the driver's face but also its background.

表示装置16は、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)などから構成され、カメラ10で撮影された顔画像から抽出された二値化画像などを表示する。   The display device 16 includes an LCD (Liquid Crystal Display), a CRT (Cathode Ray Tube), or the like, and displays a binarized image extracted from a face image taken by the camera 10.

コンピュータ14は、カメラ10により取得された顔画像を処理して顔の中心位置を検出する装置であり、図2に示すように、A/D変換器21と、画像メモリ22と、ROM23と、CPU24と、RAM25と、表示制御装置27と、光源制御装置28と、を備える。   The computer 14 is a device that processes the face image acquired by the camera 10 and detects the center position of the face. As shown in FIG. 2, the A / D converter 21, the image memory 22, the ROM 23, A CPU 24, a RAM 25, a display control device 27, and a light source control device 28 are provided.

A/D(アナログ/ディジタル)変換器21は、カメラ10で撮影されたアナログ画像信号をディジタル信号に変換する。
画像メモリ22は、カメラ10により生成され、A/D変換器21でディジタル化された画像データを記憶する。
ROM23は、CPUの動作を制御するためのプログラムや固定データを記憶する。
CPU24は、ROM23に格納されているプログラムを実行することにより、画像処理を行って顔の中心位置を検出する。
RAM25は、CPU24のワークリアとして機能する。
表示制御装置27は、CPU24の制御下に、表示装置16を制御する。
光源制御装置28は、照明光源12の点灯・消灯を制御する。
An A / D (analog / digital) converter 21 converts an analog image signal photographed by the camera 10 into a digital signal.
The image memory 22 stores image data generated by the camera 10 and digitized by the A / D converter 21.
The ROM 23 stores programs and fixed data for controlling the operation of the CPU.
The CPU 24 executes a program stored in the ROM 23 to perform image processing and detect the center position of the face.
The RAM 25 functions as a work rear for the CPU 24.
The display control device 27 controls the display device 16 under the control of the CPU 24.
The light source control device 28 controls turning on / off of the illumination light source 12.

図3は、ROM23に格納される固定データの一例を示す。
図3(a)に示すように、ROM23は、カメラ10により撮影される顔画像のうち、予め目が位置すると予想される領域(目領域)を定義する座標データy1とy2を記憶する。
FIG. 3 shows an example of fixed data stored in the ROM 23.
As shown in FIG. 3A, the ROM 23 stores coordinate data y1 and y2 that define areas (eye areas) where the eyes are expected to be located in advance in the face image captured by the camera 10.

また、ROM23は、図3(b)に示すように、カメラ10により撮影される顔画像に含まれる目の画像の予想される縦幅と横幅(画素数)と、サングラスのレンズ部分の画像の予想される縦幅と横幅(画素数)と、を記憶する。なお、これらの値は、顔画像のサイズを縦横(yx)それぞれ60画素程度としたときのサイズであり、画像のサイズ等に応じて適宜変更されるものである。   Further, as shown in FIG. 3B, the ROM 23 stores the expected vertical and horizontal widths (number of pixels) of the eye image included in the face image captured by the camera 10 and the image of the lens part of the sunglasses. The expected vertical width and horizontal width (number of pixels) are stored. These values are the sizes when the size of the face image is about 60 pixels in both vertical and horizontal directions (yx), and are appropriately changed according to the size of the image.

また、ROM23は、図3(c)に示すように、ドライバーの目の標準的な画像を記憶する。なお、目だけでなく、眉、目と眉のセット等の画像を用意してもよい。   Further, the ROM 23 stores a standard image of the eyes of the driver as shown in FIG. Note that not only eyes but also images such as eyebrows and sets of eyes and eyebrows may be prepared.

次に、上記構成を有する顔中心位置検出装置の動作を説明する。
図4は、ROM23に格納された顔中心位置検出プログラムの処理ルーチンを示すフローチャートである。CPU24は、この処理ルーチンに従ってステップを繰り返して処理を行う。
Next, the operation of the face center position detection apparatus having the above configuration will be described.
FIG. 4 is a flowchart showing a processing routine of the face center position detection program stored in the ROM 23. The CPU 24 performs processing by repeating steps according to this processing routine.

CPU24は、例えば、内部タイマが一定時間を経過する度に、例えば、100ms毎に、内部割り込みを発生し、図4に示す処理ルーチンを起動し、まず、カメラ10の撮影した顔画像をA/D変換器21を介して取り込み、画像メモリ22に格納する(ステップS11)。これにより、例えば、図9(a)や図10(a)に示すようなドライバーの顔画像が得られる。なお、この顔画像は背景などの顔以外の画像も含んでいる。   For example, every time the internal timer passes a certain time, the CPU 24 generates an internal interrupt every 100 ms, for example, and starts the processing routine shown in FIG. The data is taken in via the D converter 21 and stored in the image memory 22 (step S11). Thereby, for example, a driver's face image as shown in FIG. 9A or FIG. 10A is obtained. Note that this face image includes images other than the face such as the background.

次に、CPU24は、取り込んだ顔画像に、ノイズ除去処理などの前処理を施す(ステップS12)。例えば、CPU24は、直前に撮影した画像と今回撮影した画像の差部を取る等して、背景部分(静止物)の画像を除去する。これにより、例えば、図9(a)や図10(a)に示すドライバーの顔画像から、図9(b)や図10(b)に示すように、背景の静止物の画像が除去される。この前処理では、必要に応じて、他のノイズ除去処理や階調調整等を行う。   Next, the CPU 24 performs preprocessing such as noise removal processing on the captured face image (step S12). For example, the CPU 24 removes the image of the background portion (stationary object) by taking the difference between the image captured immediately before and the image captured this time. As a result, for example, the background stationary object image is removed from the driver's face image shown in FIGS. 9A and 10A as shown in FIGS. 9B and 10B. . In this pre-processing, other noise removal processing and gradation adjustment are performed as necessary.

続いて、CPU24は、任意の閾値を基準として、顔画像を構成する各画素の階調を二値化する(ステップS13)。閾値としては、例えば、顔画像を形成する全画素の平均値を使用できる。これにより、例えば、図9(b)や図10(b)に示すドライバーの階調顔画像から、図9(c)や図10(c)に示すような二値画像が生成される。   Subsequently, the CPU 24 binarizes the gradation of each pixel constituting the face image with an arbitrary threshold as a reference (step S13). As the threshold value, for example, an average value of all the pixels forming the face image can be used. Thereby, for example, a binary image as shown in FIG. 9C or FIG. 10C is generated from the gradation face image of the driver shown in FIG. 9B or FIG. 10B.

続いて、CPU24は、二値画像のうち、目の存在が予定されている領域を定義する領域指定データ(図3(a)に示すy1,y2)をROM23から読み出し、二値化画像の目領域を図9(d)、図10(d)に示すように切り出す(ステップS14)。   Subsequently, the CPU 24 reads out the area designation data (y1, y2 shown in FIG. 3A) that defines the area where the eye is expected to be present from the binary image, and reads the eyes of the binarized image. The region is cut out as shown in FIGS. 9D and 10D (step S14).

続いて、切り出した二値化画像について、白黒白横エッジを検出する(ステップS15)。
ここで、白黒白エッジとは、単に白と黒の境界となるエッジではなく、白から黒へ、さらに白へと変化し、所定の幅を有するエッジのことである。このうち、白黒白横エッジとは、横方向にのびる境界の意味であり、白黒白縦エッジとは、縦方向にのびる境界の意味である。
Subsequently, a black-and-white white horizontal edge is detected from the cut binary image (step S15).
Here, the black-and-white white edge is not an edge that merely becomes a boundary between white and black, but an edge that changes from white to black and further to white and has a predetermined width. Among these, the black and white white horizontal edge means a boundary extending in the horizontal direction, and the black and white white vertical edge means a boundary extending in the vertical direction.

白黒白横エッジ検出処理において、CPU24は、図3(b)に示す設定に従って、目領域画像中で縦方向に2〜4ピクセルの幅の黒い画素列を検出する。   In the monochrome white / horizontal edge detection process, the CPU 24 detects a black pixel row having a width of 2 to 4 pixels in the vertical direction in the eye area image according to the setting shown in FIG.

白黒白横エッジを検出する手法自体は任意である。例えば、図5のフローチャートに示すように、座標値yを順次更新しつつ、画素(x,y)の輝度を判別し、輝度が白から黒に変化すると、黒の連続する数をカウントし、黒が白に変わった時点で黒の連続数が2〜4であるか否かを判別し、連続数が2〜4であれば、その画素を維持し、それ以外であれば、それらの画素を白に変換するという手法を採用できる。   The technique itself for detecting the black-and-white white horizontal edge is arbitrary. For example, as shown in the flowchart of FIG. 5, while sequentially updating the coordinate value y, the luminance of the pixel (x, y) is determined, and when the luminance changes from white to black, the number of consecutive blacks is counted, When black changes to white, it is determined whether or not the number of continuous blacks is 2 to 4. If the continuous number is 2 to 4, the pixel is maintained; Can be used.

具体的に説明すると、CPU24は、まず、処理対象の画素の座標(x,y)を初期値の(1,1)と設定する(ステップS101)。なお、目領域画像の原点の座標を(0,0)とする。   Specifically, the CPU 24 first sets the coordinates (x, y) of the pixel to be processed as the initial value (1, 1) (step S101). Note that the coordinates of the origin of the eye area image are (0, 0).

続いて、CPU24は、処理対象の画素(座標(x,y)の画素)の色とその1つ前の(1つ上の)座標(x,y−1)の画素の色とを判別する(ステップS102)。   Subsequently, the CPU 24 determines the color of the pixel to be processed (the pixel at coordinates (x, y)) and the color of the pixel at the previous coordinate (x, y−1). (Step S102).

ステップS102で、座標(x,y−1)の画素の色が白で、座標(x,y)の画素の色が黒であると判別すれば、白から黒への境界であり、ステップS103に進み、処理対象の画素の座標(x,y)を記憶し、さらに、黒連続数カウンタCを1にセットする。   If it is determined in step S102 that the color of the pixel at coordinates (x, y-1) is white and the color of the pixel at coordinates (x, y) is black, it is a boundary from white to black, and step S103. Then, the coordinates (x, y) of the pixel to be processed are stored, and the black continuous number counter C is set to 1.

ステップS102で、座標(x,y−1)の画素の色が黒で、座標(x,y)の画素の色が黒であると判別すれば、黒が連続しており、ステップS104に進み、その画素の座標値(x,y)を記憶し、さらに、黒連続数カウンタCに+1する。   If it is determined in step S102 that the color of the pixel at the coordinate (x, y-1) is black and the color of the pixel at the coordinate (x, y) is black, the black is continuous, and the process proceeds to step S104. The coordinate value (x, y) of the pixel is stored, and the black continuous number counter C is incremented by one.

ステップS103で、座標(x,y−1)の画素の色が黒で、座標(x,y)の画素の色が白であると判別すれば、黒から白への境界であり、ステップS105に進み、黒連続数カウンタCの値が2〜4のいずれであるかを判別する。   If it is determined in step S103 that the color of the pixel at coordinates (x, y-1) is black and the color of the pixel at coordinates (x, y) is white, this is a boundary from black to white, and step S105. Then, it is determined whether the value of the black continuous number counter C is 2 to 4.

ステップS105で、黒連続数カウンタCの値が2〜4のいずれかではない、即ち、黒画素の連続数が1又は5以上であると判別すると(ステップS105;No)、ステップS103及び/又はステップS104で記憶した座標位置の画素の色を「黒」から「白」に変更する(ステップS106)。その後、記憶してい座標値をリセットし、さらに、黒連続数カウンタCを0にリセットする(ステップS107)。   If it is determined in step S105 that the value of the black continuous number counter C is not any of 2 to 4, that is, the number of continuous black pixels is 1 or 5 (step S105; No), step S103 and / or The color of the pixel at the coordinate position stored in step S104 is changed from “black” to “white” (step S106). Thereafter, the stored coordinate values are reset, and further, the black continuous number counter C is reset to 0 (step S107).

ステップS105で、黒連続数カウンタCの値が2〜4のいずれかである、即ち、黒画素の連続数が2〜4であると判別すると(ステップS105;Yes)、ステップS103及び/又はステップS104で記憶した座標位置の黒画素をそのまま維持して、記憶している座標値をリセットし、さらに、黒連続数カウンタCを0にリセットする(ステップS107)。   If it is determined in step S105 that the value of the black continuous number counter C is 2 to 4, that is, the number of continuous black pixels is 2 to 4 (step S105; Yes), step S103 and / or step The black pixel at the coordinate position stored in S104 is maintained as it is, the stored coordinate value is reset, and the black continuous number counter C is reset to 0 (step S107).

ステップS102で、座標(x,y−1)の画素の色が白で、座標(x,y)の画素の色が白であると判別すれば、白が連続しており、ステップS103〜S107の処理をジャンプする。   If it is determined in step S102 that the color of the pixel at coordinates (x, y-1) is white and the color of the pixel at coordinates (x, y) is white, white is continuous, and steps S103 to S107 are performed. Jump processing.

以上の処理に続いて、CPU24は、座標値yが最終値に達したか否かを判別し(ステップS108)、達していなければ(ステップS108;No)、縦方向(y方向)の次の画素を処理するためにyを+1して(ステップS109)、ステップS102にリターンする。   Following the above processing, the CPU 24 determines whether or not the coordinate value y has reached the final value (step S108). If the coordinate value y has not reached (step S108; No), the next in the vertical direction (y direction) is determined. In order to process the pixel, y is incremented by 1 (step S109), and the process returns to step S102.

一方、ステップS108で、座標値yが最終値に達していれば(ステップS108;Yes)、x座標値が最終値であるか否かを判別する(ステップS110)。x座標が最終値でなければ(ステップS110;No)、次の列の画素を処理するために、x=x+1,y=1に設定して(ステップS111)、ステップS102にリターンする。また、x座標が最終値であれば(ステップS110;Yes)、処理を終了する。   On the other hand, if the coordinate value y has reached the final value in step S108 (step S108; Yes), it is determined whether or not the x-coordinate value is the final value (step S110). If the x-coordinate is not the final value (step S110; No), x = x + 1 and y = 1 are set (step S111) in order to process the pixels in the next column, and the process returns to step S102. If the x coordinate is the final value (step S110; Yes), the process is terminated.

このような構成とすることにより、連続数がy方向に1つ以下及び5以上の黒画素が、白画素に変換される。このため、切り出した目領域の画像が図11(a)や図12(a)に例示するような画像(各升目が1画素を示す)であった場合には、図11(b)、図12(b)に示すような画像に変換される。これにより、目或いは眉を構成しない、縦方向に長い黒画素列や、縦方向に1画素しか存在しない画素などが除去される。   With such a configuration, black pixels having a continuous number of 1 or less and 5 or more in the y direction are converted into white pixels. For this reason, when the image of the cut-out eye region is an image as illustrated in FIGS. 11A and 12A (each cell represents one pixel), FIG. 11B and FIG. It is converted into an image as shown in FIG. As a result, black pixel rows that do not constitute eyes or eyebrows and that are long in the vertical direction, or pixels that have only one pixel in the vertical direction are removed.

図5に示す白黒白横エッジ検出処理終了後、処理は図4のステップS16に進み、ステップS15の白黒白横エッジ検出処理と同様の動作により白黒白縦エッジを検出する。   After the black and white white horizontal edge detection process shown in FIG. 5 is completed, the process proceeds to step S16 in FIG.

白黒白縦エッジ検出処理は、ステップS15で処理済みの目領域の画像から、図3(b)の設定に従って、横方向に6〜12ピクセルの幅の黒の画素列を検出する処理である。   The black-and-white white vertical edge detection process is a process of detecting a black pixel row having a width of 6 to 12 pixels in the horizontal direction from the image of the eye region processed in step S15 in accordance with the setting shown in FIG.

白黒白縦エッジを検出する手法自体は任意であるが、例えば、図6に示す手法を使用できる。図6に示す処理は、処理の方向が異なる点を除けば、図5の処理と基本的に同一であり、ステップS201で処理の始点画素を(1,1)に設定し、以後、処理対象の画素の座標(x,y)と1つ前の(左横の)座標(x−1,y)の画素の色とを判別する(ステップS202)。   Although the technique itself for detecting the black and white white vertical edge is arbitrary, for example, the technique shown in FIG. 6 can be used. The process shown in FIG. 6 is basically the same as the process shown in FIG. 5 except that the process direction is different. In step S201, the process start point pixel is set to (1, 1). The pixel coordinates (x, y) and the color of the pixel at the previous (left lateral) coordinate (x-1, y) are discriminated (step S202).

ステップS202で、画素の色が白から黒に変わったとすれば、処理対象の画素の座標(x,y)を記憶し、さらに、黒連続数カウンタCを1にセットし(ステップS203)、
ステップS202で、黒の画素が連続していると判別すれば、その画素の座標値(x,y)を記憶し、さらに、黒連続数カウンタCに+1する(ステップS204)。
If the pixel color is changed from white to black in step S202, the coordinates (x, y) of the pixel to be processed are stored, and the black continuous number counter C is set to 1 (step S203).
If it is determined in step S202 that black pixels are continuous, the coordinate value (x, y) of the pixel is stored, and the black continuous number counter C is incremented by 1 (step S204).

ステップS202で、画素の色が黒から白に変化していると判別すれば、黒連続数カウンタCの値が6〜12のいずれであるかを判別し(ステップS205)、黒画素の連続数が1〜5又は13以上であると判別すると(ステップS205;No)、記憶した座標位置の画素の色を「黒」から「白」に変更し(ステップS206)、さらに、記憶している座標値と黒連続数カウンタCとをリセットし(ステップS207)、
ステップS202で、黒画素の連続数が6〜12であると判別すると(ステップS205;Yes)、それらの黒画素をそのまま維持する(ステップS207)。
If it is determined in step S202 that the color of the pixel has changed from black to white, it is determined which of the black continuous number counter C is 6 to 12 (step S205), and the continuous number of black pixels. Is determined to be 1 to 5 or 13 or more (step S205; No), the color of the pixel at the stored coordinate position is changed from "black" to "white" (step S206), and the stored coordinates The value and the black continuous number counter C are reset (step S207),
If it is determined in step S202 that the continuous number of black pixels is 6 to 12 (step S205; Yes), these black pixels are maintained as they are (step S207).

そして、xを更新しながら順次処理を進め、xが最終値まで達すると、次の画素行について同様の処理を繰り返し、最終画素行まで終了すると、処理を終了する(ステップS208〜S211)。   Then, the process is sequentially advanced while updating x. When x reaches the final value, the same process is repeated for the next pixel line, and when the process reaches the final pixel line, the process ends (steps S208 to S211).

このような構成とすることにより、例えば、横エッジ検出後の目領域の画像が図11(b)、12(b)に例示する画像であった場合に、連続数がx方向に1〜5及び13以上の黒画素が、白画素に変換される。これにより、目或いは眉を構成しない、横方向に短い黒画素列や、長すぎる黒画素列が除去される。   By adopting such a configuration, for example, when the image of the eye region after the detection of the horizontal edge is the image illustrated in FIGS. 11B and 12B, the continuous number is 1 to 5 in the x direction. And 13 or more black pixels are converted into white pixels. As a result, black pixel rows that are short in the horizontal direction and do not constitute eyes or eyebrows or black pixel rows that are too long are removed.

次に、CPU24は、このような処理を行った後の目領域の画像に基づいて、目の画像を検出されたか否かを判別する(図4,ステップS17)。   Next, the CPU 24 determines whether or not an eye image has been detected based on the image of the eye area after such processing (step S17 in FIG. 4).

CPU24は、処理後の目領域の画像に、縦方向に2〜4画素で、横方向に6〜12画素の黒領域が得られている場合には、目の画像が検出されたと判別する(ステップS17;Yes)。この場合、CPU24は、サングラス連続検出回数を0にリセットする(ステップS18)。   The CPU 24 determines that an eye image has been detected when a black region of 2 to 4 pixels in the vertical direction and 6 to 12 pixels in the horizontal direction is obtained in the processed image of the eye region ( Step S17; Yes). In this case, the CPU 24 resets the number of consecutive sunglasses detections to 0 (step S18).

さらに、CPU24は、このような処理を行った後の目領域の画像を元の二値画像に上書きして、重心測定用の顔画像を生成する(ステップS19)。例えば、図9(d)に示す処理後の目領域の画像を、図9(c)に示す元の二値画像に上書きして、図9(e)に示す中心位置測定用の顔画像を生成する。なお、目領域と類似の処理を口領域、鼻領域などに施して、ノイズを除去する等してもよい。   Further, the CPU 24 overwrites the original binary image with the image of the eye area after such processing, and generates a face image for measuring the center of gravity (step S19). For example, the processed eye region image shown in FIG. 9D is overwritten with the original binary image shown in FIG. 9C, and the face image for center position measurement shown in FIG. Generate. Note that processing similar to that for the eye region may be performed on the mouth region, the nose region, and the like to remove noise.

続いて、ステップS19で得られた中心位置測定用の画像を用いて、顔の中心位置(顔の位置、重心位置)を求める(ステップS20)。中心の測定手法自体は任意であるが、例えば、次式から顔の中心(重心)位置の座標を求めることができる。
顔の中心のx座標=Σxi/n xi:i番目の黒画素のx座標の値
顔の中心のy座標=Σyi/n yi:i番目の黒画素のy座標の値
i:1〜n nは黒画素の総数
Subsequently, the center position (face position, center of gravity position) of the face is obtained using the center position measurement image obtained in step S19 (step S20). Although the center measurement method itself is arbitrary, for example, the coordinates of the center (center of gravity) position of the face can be obtained from the following equation.
X-coordinate of the center of the face = Σxi / n xi: x-coordinate value of the i-th black pixel y-coordinate of the center of the face = Σyi / n yi: y-coordinate value of the i-th black pixel i: 1 to n n Is the total number of black pixels

ドライバーがサングラスをかけている場合、サングラスのレンズ部分(目をカバーする部分)は人間の目と比べて非常に大きい。このため、ステップS15,S16で実行される白黒白エッジ検出処理により、図12に示すように、サングラス部分の画像の画素が白画素に変換される。このため、目領域の画像には黒画素がほとんど残らない。このため、ステップS17では、目の画像が取得できなかった(ステップS16;No)と判別される。   When the driver wears sunglasses, the lens part of the sunglasses (the part that covers the eyes) is much larger than the human eye. For this reason, as shown in FIG. 12, the pixels of the image of the sunglasses portion are converted into white pixels by the monochrome white edge detection process executed in steps S15 and S16. For this reason, almost no black pixels remain in the image of the eye area. For this reason, in step S17, it is determined that the eye image could not be acquired (step S16; No).

このため、処理は、ステップS21のサングラス検出処理に進む。
ステップS21のサングラス検出処理においては、図7に示すように、目領域を検出するステップS14〜S16の処理と同様にして、サングラスの画像を検出する。即ち、ROM23に格納されている図3(b)に示す設定に従って、予想されるサングラスのサイズを基準として、黒画素が縦方向及び横方向に所定数連続する部分を検出する。
For this reason, a process progresses to the sunglasses detection process of step S21.
In the sunglasses detection process of step S21, as shown in FIG. 7, the image of sunglasses is detected in the same manner as the processes of steps S14 to S16 for detecting the eye region. That is, in accordance with the setting shown in FIG. 3B stored in the ROM 23, a portion where a predetermined number of black pixels continue in the vertical and horizontal directions is detected based on the expected size of sunglasses.

まず、図7に示すように、二値化した顔画像から目領域の画像を切り出す(ステップS41)。   First, as shown in FIG. 7, an image of the eye area is cut out from the binarized face image (step S41).

続いて、切り出した目領域の画像について、サングラス検出用の白黒白横エッジ検出処理を実行する(ステップS42)。この処理は、基本的に図5に示す目の抽出処理と同一である。ただし、ステップS105でCの範囲が、ROM23に格納されている図3(b)の設定に従って、サングラスの縦方向のサイズにあわせて6〜12に設定される。   Subsequently, a black-and-white white lateral edge detection process for detecting sunglasses is performed on the cut-out eye region image (step S42). This process is basically the same as the eye extraction process shown in FIG. However, in step S105, the range of C is set to 6 to 12 in accordance with the size of the sunglasses in the vertical direction in accordance with the setting of FIG.

続いて、白黒白横エッジ検出済の目領域の画像について、サングラス検出用の白黒白縦エッジ検出処理を実行する(ステップS43)。この処理は、基本的に図6に示す目の縦エッジ検出処理と同一である。ただし、ステップS205でCの範囲が、ROM23に格納されている図3(b)の設定に従って、サングラスの横方向のサイズにあわせて10〜18に設定される。   Subsequently, a black-and-white white vertical edge detection process for detecting sunglasses is executed on the image of the eye area where black-and-white white and horizontal edges have been detected (step S43). This process is basically the same as the vertical edge detection process of the eye shown in FIG. However, in step S205, the range of C is set to 10 to 18 according to the size of the sunglasses in the horizontal direction in accordance with the setting of FIG. 3B stored in the ROM 23.

このような処理を行う結果、例えば、図13(a)に示すようなサングラスのレンズ部分の画像は、白黒白横エッジ検出処理(ステップS42)により図13(b)に示すように加工され、さらに、白黒白縦エッジ検出処理(ステップS43)により図13(c)に示すように加工され、レンズが検出される。   As a result of such processing, for example, the image of the lens portion of the sunglasses as shown in FIG. 13A is processed as shown in FIG. 13B by the black and white white lateral edge detection processing (step S42), Further, processing is performed as shown in FIG. 13C by black and white white vertical edge detection processing (step S43), and the lens is detected.

このような処理を行った後の目領域の画像に基づいて、CPU24は、サングラスが検出されたか否かを判別する(図4;ステップS22)。
CPU24は、図13(c)に示すように、縦方向に6〜12画素で、横方向に10〜18画素の黒領域が得られている場合には、目の画像が検出されたと判別する。
Based on the image of the eye area after performing such processing, the CPU 24 determines whether or not sunglasses are detected (FIG. 4; step S22).
As shown in FIG. 13C, the CPU 24 determines that an eye image has been detected when a black region of 6 to 12 pixels in the vertical direction and 10 to 18 pixels in the horizontal direction is obtained. .

サングラスが検出さなければ(ステップS22;No)、フローは前述のステップS18に進み、サングラス連続検出回数を0に設定し、通常の画像処理を行って(ステップS19)、顔中心位置を検出する(ステップS20)。   If sunglasses are not detected (step S22; No), the flow proceeds to step S18 described above, the number of consecutive sunglasses detections is set to 0, normal image processing is performed (step S19), and the face center position is detected. (Step S20).

一方、ステップS22で、サングラスが検出されれば(ステップS22;Yes)、サングラス連続検出回数を+1し(ステップS23)、さらに、サングラス連続検出回数が基準値m以上であるか否かを判別する(ステップS24)。このサングラス連続検出回数は、ステップS11で一定周期で順次取得される顔画像について、何回連続してサングラスが検出されたかを示す値である。割り込み周期が前述のように100msであるとすれが、m・100msの間連続してサングラスが検出され続けた場合に、ステップS24では、Yesと判別される。   On the other hand, if sunglasses are detected in step S22 (step S22; Yes), the number of consecutive sunglasses detections is incremented by 1 (step S23), and it is further determined whether the number of consecutive sunglasses detections is greater than or equal to the reference value m. (Step S24). The number of consecutive sunglasses detections is a value indicating how many times sunglasses have been detected continuously for the face images sequentially acquired at a constant cycle in step S11. If the interrupt cycle is 100 ms as described above, but sunglasses are continuously detected for m · 100 ms, it is determined Yes in step S24.

ステップS24で、Yesと判別されると、サングラス対応画像処理を実行する(ステップS25)。このサングラス対応画像処理においては、サングラスの左右のレンズの位置を特定し、特定したレンズ位置から、左右の目の位置を特定(推定)し、この位置を基準として、ROM23に格納されている図3(c)に示す目の画像を合成する。   If it is determined as Yes in step S24, sunglasses corresponding image processing is executed (step S25). In this sunglasses-compatible image processing, the positions of the left and right lenses of the sunglasses are specified, the positions of the left and right eyes are specified (estimated) from the specified lens positions, and the figure stored in the ROM 23 with this position as a reference. The eye image shown in 3 (c) is synthesized.

具体的に説明すると、図8に示すように、CPU24は、まず、サングラスの左右のレンズの中心位置の座標をそれぞれ判別する(ステップS51)。各レンズの中心位置を求める手法は任意であるが、例えば、目領域の左右に位置するレンズの黒画像それぞれについて、ステップS20に示した重心を求める処理と同様の処理を行えばよい。   Specifically, as shown in FIG. 8, the CPU 24 first determines the coordinates of the center positions of the left and right lenses of the sunglasses (step S51). The method for obtaining the center position of each lens is arbitrary. For example, the same process as the process for obtaining the center of gravity shown in step S20 may be performed for each of the black images of the lenses located on the left and right sides of the eye area.

次に、特定されたレンズの位置を基準として、目の位置を特定(推定する)する(ステップS52)。目の位置は、レンズの中心位置でも良いし、例えば、統計的に算出したオフセット値をレンズ中心位置に加算して求めても良い。   Next, the eye position is specified (estimated) based on the specified lens position (step S52). The eye position may be the center position of the lens, or may be obtained, for example, by adding a statistically calculated offset value to the lens center position.

次に、目領域の画像と同一サイズの画像のステップS52で求めた目の位置に、ROM23に格納しておいた目の画像(図3(c))を合成する(ステップS53)。   Next, the eye image (FIG. 3C) stored in the ROM 23 is combined with the eye position obtained in step S52 of the same size image as the eye region image (step S53).

次に、二値画像のうち、目領域を除いた部分の画像と、ステップS53で生成した目領域画像とを合成して、目、鼻、口等を含む顔画像を重心測定用の顔画像として合成する(ステップS54)。   Next, the image of the portion excluding the eye area in the binary image and the eye area image generated in step S53 are synthesized, and the face image including the eyes, nose, mouth, and the like is obtained as the face image for measuring the center of gravity. Are synthesized (step S54).

具体例に基づいて説明すると、例えば、図14(a)に示すサングラスをかけたドライバーの顔画像から、ステップS21のサングラス検出処理で、図14(b)に示す目領域の画像が切り出される(ステップS41)。続いて、サングラス検出用白黒白横エッジ検出処理(ステップS42)、サングラス検出用白黒白縦エッジ検出処理(ステップS43)、により、図14(c)に示すように、サングラスのレンズの画像が抽出される。   To explain based on a specific example, for example, an image of the eye region shown in FIG. 14B is cut out from the face image of the driver wearing sunglasses shown in FIG. Step S41). Subsequently, as shown in FIG. 14C, an image of the lens of the sunglasses is extracted by the black and white white horizontal edge detection process for detecting sunglasses (step S42) and the black and white white vertical edge detection process for detecting sunglasses (step S43). Is done.

続いて、ステップS22でサングラスが検出され、サングラス連続検出回数がm回以上であれば(ステップS24;Yes)、ステップS25のサングラス対応画像処理により、サングラスの各レンズの位置が特定され(ステップS51)、レンズの位置に基づいて、図14(d)に示すように目の位置が特定される(ステップS52)。続いて、図14(e)に示すように、目の画像が合成される(ステップS53)。   Subsequently, if sunglasses are detected in step S22 and the number of consecutive sunglasses detections is greater than or equal to m (step S24; Yes), the position of each lens of the sunglasses is specified by the sunglasses-compatible image processing in step S25 (step S51). ) Based on the lens position, the eye position is specified as shown in FIG. 14D (step S52). Subsequently, as shown in FIG. 14E, an eye image is synthesized (step S53).

続いて、図14(f)に示す目領域を除去した二値画像と図14(e)の目領域画像とが合成され、重心測定用の顔画像が生成される(ステップS54)。   Subsequently, the binary image from which the eye area shown in FIG. 14F is removed and the eye area image shown in FIG. 14E are combined to generate a face image for measuring the center of gravity (step S54).

その後、処理は図4のステップS20に進み、前述の処理により、顔の中心位置を判別する。   Thereafter, the process proceeds to step S20 in FIG. 4, and the center position of the face is determined by the above-described process.

以上説明したように、この顔中心位置検出装置によれば、顔画像からサングラスの有無を検出し、検出結果に基づいて、サングラスをかけているかいないかに関わらず、適切に顔の中心位置を判別することが可能となる。顔の中心位置を判別することにより、顔の有無、顔の位置、顔の向きなどの判別も可能となる。   As described above, according to the face center position detection device, the presence / absence of sunglasses is detected from the face image, and the center position of the face is appropriately determined based on the detection result regardless of whether or not sunglasses are worn. It becomes possible to do. By determining the center position of the face, it is possible to determine the presence / absence of the face, the position of the face, the orientation of the face, and the like.

なお、この発明は上記実施の形態に限定されず、種々の変形及び応用が可能である。
例えば、上記実施の形態では、目領域を画像の特定の位置に固定したが、目領域を顔の画像のサイズや位置に応じて、目領域の位置を適宜設定しても良い。この場合、例えば、ステップS11で取得した画像に縦エッジソーベルフィルタと横エッジソーベルフィルタを適用し、顔のエッジを検出し、顔の上端、下端、左端、右端を判別し、例えば、上端と下端との間の3/10〜6/10のエリアで、左端と右端の間のエリアを目領域とすればよい。その他、目領域を特定する手法は任意である。
In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.
For example, in the above embodiment, the eye area is fixed at a specific position in the image, but the position of the eye area may be appropriately set according to the size and position of the face image. In this case, for example, the vertical edge sobel filter and the horizontal edge sobel filter are applied to the image acquired in step S11, the face edge is detected, the top edge, the bottom edge, the left edge, and the right edge of the face are determined. The area between the left end and the right end in the area of 3/10 to 6/10 between the lower end and the lower end may be the eye area. In addition, the method for specifying the eye region is arbitrary.

また、上記実施の形態では、目と眉(又は目)と、鼻、口の画像から顔の中心(重心)位置を求めたが、中心位置の判別に使用する顔の部分(パーツ)は任意である。例えば、耳や、ほお、頭髪などを加えて、中心を求めても良い。   In the above embodiment, the center (center of gravity) position of the face is obtained from the images of eyes, eyebrows (or eyes), nose, and mouth, but the face part (parts) used to determine the center position is arbitrary. It is. For example, the center may be obtained by adding ears, cheeks, hair, and the like.

また、上記実施の形態では、サングラスが検出された場合に、目の画像を合成し、合成画像に基づいて顔の中心地位を求めたが、重心を求める手法は任意である。例えば、サングラスが検出された場合には、「目と眉」の画像を合成して中心を求めたり、サングラスのレンズの画像を構成する各画素に0.3〜0.5倍程度の重みを付けた上で、各部(レンズ、目、鼻、口...)の重心を求めて、顔画像の重心をもとめてもよい。また、図14(f)に示すような目領域を除いた部分の顔画像から得られた重心に対し、目の画像が与える影響を予め考慮したオフセット値を加算するなどして重心を求めてもよい。   Moreover, in the said embodiment, when sunglasses were detected, the image of eyes was combined and the center position of the face was calculated | required based on the synthesized image, but the method of calculating | requiring a gravity center is arbitrary. For example, when sunglasses are detected, a center is obtained by combining the images of “eyes and eyebrows”, or a weight of about 0.3 to 0.5 times is applied to each pixel constituting the lens image of sunglasses. In addition, the center of gravity of each face (lens, eyes, nose, mouth,...) May be obtained to obtain the center of gravity of the face image. Further, the center of gravity is obtained by adding an offset value in consideration of the influence of the eye image in advance to the center of gravity obtained from the face image excluding the eye region as shown in FIG. Also good.

上記実施の形態では、この発明を顔の中心位置を検出するために、サングラスの有無を検出する実施形態を示したが、サングラスを検出した後で、その結果をどのような処理に使用するかは任意である。例えば、サングラスを検出し、それにより、それにより照明の強度を変更したり、画面のバックライトの輝度を調整する等の場面に使用することも可能である。   In the above embodiment, the present invention has shown the embodiment in which the presence / absence of sunglasses is detected in order to detect the center position of the face. However, after detecting the sunglasses, what kind of processing is used for the result? Is optional. For example, it is possible to detect sunglasses, thereby changing the intensity of illumination and adjusting the brightness of the backlight of the screen.

図1,図2を参照して説明したシステム構成も一例であり、任意に変更可能である。例えば、照明光源12を設ける必要は必ずしも無い。また、例えば、カメラ10を遠赤外線等で画像をとらえる赤外線カメラを使用すれば、人種や肌や髪の色に影響されず比較的正確に顔の各パーツの画像を取得することが可能となる。   The system configuration described with reference to FIGS. 1 and 2 is also an example, and can be arbitrarily changed. For example, it is not always necessary to provide the illumination light source 12. For example, if the camera 10 is an infrared camera that captures images with far infrared rays, it is possible to acquire images of each part of the face relatively accurately without being affected by race, skin, or hair color. Become.

また、上述のフローチャートも同様の機能が実現できるならば、任意に変更可能である。
例えば、上記実施の形態では、連続的m回以上にサングラスの画像が得られたときに、サングラス対応画像処理(ステップ25)を実行したが、サングラスが検出された顔画像については全て、サングラス対応画像処理を実行するようにしてもよい。
The above-described flowchart can be arbitrarily changed as long as the same function can be realized.
For example, in the above embodiment, when the image of sunglasses is obtained continuously m times or more, the sunglasses-compatible image processing (step 25) is executed. Image processing may be executed.

上記実施の形態では、ステップS13で二値画像を形成してから白黒白横エッジ検出処理及び白黒白縦エッジ検出処理を実行したが、二値化処理を行わずに、顔画像の階調値から白黒白エッジを直接検出するようにしてもよい。   In the above embodiment, the black-and-white white horizontal edge detection process and the black-and-white white vertical edge detection process are executed after the binary image is formed in step S13, but the gradation value of the face image is not performed without performing the binarization process. Alternatively, the black and white white edge may be directly detected.

また、本発明において、白黒白エッジは階調の差異を表現するためのものであり、色としての白や黒に限定されるものではなく、色相はなんでもよい。カラー画像に関しては、各画素の色相を考慮してサングラスの有無を判別してもよい。   Further, in the present invention, the black and white white edge is for expressing a difference in gradation, and is not limited to white or black as a color, and any hue may be used. Regarding color images, the presence or absence of sunglasses may be determined in consideration of the hue of each pixel.

上記各実施の形態においては、ドライバーを撮影してサングラスを検出する場合にこの発明を適用したが、この発明はこれに限定されず、任意の場面で人間、動物、人形、ロボット等がサングラスをかけているか否かを判別する処理に広く適用可能である。   In each of the above embodiments, the present invention is applied to the case where sunglasses are detected by photographing a driver. However, the present invention is not limited to this, and humans, animals, dolls, robots, etc. wear sunglasses in any scene. The present invention can be widely applied to processing for determining whether or not it is applied.

本発明は、カメラで画像を取得しながら処理する場合に限定されず、例えば、他所で撮影した1又は複数の顔画像のそれぞれについて、サングラスの有無、顔の中心の位置、顔の向きなどを判別する為に使用可能である。   The present invention is not limited to processing while acquiring an image with a camera. For example, for each of one or a plurality of face images photographed elsewhere, the presence or absence of sunglasses, the position of the center of the face, the orientation of the face, etc. It can be used to determine.

また、コンピュータに上述の処理を実行させるためのコンピュータプログラムを、任意の記録媒体やネットワークを介してROMに格納するようにしてもよい。   Further, a computer program for causing a computer to execute the above-described processing may be stored in the ROM via an arbitrary recording medium or a network.

本発明の実施形態に係る顔中心判別装置のブロック図である。It is a block diagram of the face center discriminating device concerning the embodiment of the present invention. 図1に示すコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of the computer shown in FIG. ROMに格納されている各種データを説明するための図である。It is a figure for demonstrating the various data stored in ROM. 図1に示す顔中心判別装置の動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of the face center discrimination device shown in FIG. 1. 図4のフローチャートにおける白黒白横エッジ検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the black-and-white white horizontal edge detection process in the flowchart of FIG. 図4のフローチャートにおける白黒白縦エッジ検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the black-and-white white vertical edge detection process in the flowchart of FIG. 図4のフローチャートにおけるサングラス検出処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the sunglasses detection process in the flowchart of FIG. 図4のフローチャートにおけるサングラス対応画像処理の具体例を説明するためのフローチャートである。It is a flowchart for demonstrating the specific example of the sunglasses corresponding | compatible image process in the flowchart of FIG. サングラスをかけていないドライバーの顔画像と画像処理の内容を説明するための図である。It is a figure for demonstrating the content of the face image of a driver who is not wearing sunglasses, and image processing. サングラスをかけているドライバーの顔画像と画像処理の内容を説明するための図である。It is a figure for demonstrating the face image of the driver wearing sunglasses, and the content of image processing. 白黒白エッジとその検出処理を説明するための図である。It is a figure for demonstrating a black-and-white white edge and its detection process. 白黒白エッジとその検出処理を説明するための図である。It is a figure for demonstrating a black-and-white white edge and its detection process. サングラスのレンズの画像とその検出処理を説明するための図である。It is a figure for demonstrating the image of the lens of sunglasses, and its detection process. サングラスの画像を含む顔画像から、顔の中心位置を求める処理を説明するための図である。It is a figure for demonstrating the process which calculates | requires the center position of a face from the face image containing the image of sunglasses.

符号の説明Explanation of symbols

10 カメラ
22 画像メモリ (顔画像記憶手段)
23 ROM (サングラス検出手段、中心位置判別手段)
24 CPU (サングラス検出手段、中心位置判別手段)
10 Camera 22 Image memory (Face image storage means)
23 ROM (Sunglasses detection means, center position determination means)
24 CPU (Sunglasses detection means, center position determination means)

Claims (8)

顔を撮影して得られた顔画像を記憶する顔画像記憶手段と、
前記顔画像記憶手段に記憶された前記顔画像について、サングラスのレンズ部分のサイズに合わせた所定数黒画素が連続する白黒白エッジ検出処理を実行するエッジ検出手段と、
前記エッジ検出手段により検出された白黒白エッジに基づいて、顔画像のサングラスの画像の有無を判別するサングラス検出手段と、
を備える、ことを特徴とするサングラス検出装置。
Face image storage means for storing a face image obtained by photographing a face;
Edge detection means for performing black and white white edge detection processing in which a predetermined number of black pixels are matched to the size of the lens portion of sunglasses for the face image stored in the face image storage means;
Sunglasses detection means for determining the presence or absence of sunglasses images of the face image based on the black and white white edge detected by the edge detection means;
A sunglasses detection device comprising:
前記エッジ検出手段は、前記顔画像記憶手段に記憶された前記顔画像の目の検出予定位置の画像データについて、サングラスのレンズ部分のサイズに合わせた白黒白エッジ検出処理を実行する、ことを特徴とする請求項1に記載のサングラス検出装置。   The edge detection means performs black-and-white white edge detection processing in accordance with the size of the lens portion of the sunglasses for the image data of the eye detection scheduled position of the face image stored in the face image storage means. The sunglasses detection device according to claim 1. 前記エッジ検出手段は、
前記サングラスのレンズ部分のサイズに合わせた白黒白横エッジ又は白黒白縦エッジを前記顔画像から検出する第1の画像処理を実行する第1の画像処理手段と、
前記第1の画像処理手段により処理された顔画像から、前記サングラスのレンズ部分のサイズに合わせた白黒白縦エッジ又は白黒白横エッジを検出する第2の画像処理を実行する第2の画像処理手段と、
を備える、ことを特徴とする請求項1に記載のサングラス検出装置。
The edge detection means includes
A first image processing means for performing a first image processing for detecting, from the face image, a black and white white horizontal edge or a black and white white vertical edge that matches the size of the lens portion of the sunglasses;
Second image processing for executing second image processing for detecting black and white white vertical edges or black and white white horizontal edges in accordance with the size of the lens portion of the sunglasses from the face image processed by the first image processing means Means,
The sunglasses detecting device according to claim 1, comprising:
前記顔画像記憶手段に記憶された前記顔画像について、目の画像データを検出する目検出手段を備え、
前記エッジ検出手段は、前記目検出手段による目の検出ができなかったときに、サングラスのレンズ部分のサイズに合わせた白黒白エッジ検出処理を実行する、
ことを特徴とする請求項1に記載のサングラス検出装置。
Eye detection means for detecting eye image data for the face image stored in the face image storage means;
The edge detection means performs black and white white edge detection processing according to the size of the lens portion of the sunglasses when the eyes cannot be detected by the eye detection means.
The sunglasses detection device according to claim 1, wherein:
前記顔画像記憶手段は、時系列的に顔を撮影して得られた画像を順次記憶し、
前記エッジ検出手段は、前記顔画像記憶手段に記憶された複数の画像についてエッジ検出処理を実行し、
前記サングラス検出手段は、複数の画像についてのエッジ検出処理の結果に基づいて、サングラスの有無を検出する、
ことを特徴とする請求項1に記載のサングラス検出装置。
The face image storage means sequentially stores images obtained by photographing faces in time series,
The edge detection means performs edge detection processing for a plurality of images stored in the face image storage means,
The sunglasses detection means detects the presence or absence of sunglasses based on the result of edge detection processing for a plurality of images.
The sunglasses detection device according to claim 1, wherein:
顔画像を撮影して前記顔画像記憶手段に供給するための赤外線カメラをさらに備える、ことを特徴とする請求項1に記載のサングラス検出装置。   The sunglasses detecting apparatus according to claim 1, further comprising an infrared camera for photographing a face image and supplying the photographed image to the face image storage means. 請求項1に記載のサングラス検出装置と、
前記サングラス検出装置によりサングラスが検出された場合に、想定される目の位置とサイズに基づいて、顔の中心を判別する中心位置判別手段と、
を備える、ことを特徴とする顔中心判別装置。
A sunglasses detection device according to claim 1;
Center position determination means for determining the center of the face based on the assumed eye position and size when sunglasses are detected by the sunglasses detection device;
A face center discrimination device characterized by comprising:
コンピュータを、
顔を撮影して得られた顔画像を記憶する顔画像記憶手段、
前記顔画像記憶手段に記憶された前記顔画像について、サングラスのレンズ部分のサイズに合わせた所定数黒画素が連続する白黒白エッジ検出処理を実行するエッジ検出手段、
前記エッジ検出手段により検出されたエッジに基づいて、顔画像のサングラスの画像の有無を判別するサングラス検出手段、
として機能させることを特徴とするコンピュータプログラム。
Computer
Face image storage means for storing a face image obtained by photographing a face;
Edge detection means for performing black and white white edge detection processing in which a predetermined number of black pixels are matched to the size of the lens portion of sunglasses for the face image stored in the face image storage means;
Sunglasses detection means for determining the presence or absence of sunglasses image of the face image based on the edge detected by the edge detection means,
A computer program that functions as a computer program.
JP2005257168A 2005-09-05 2005-09-05 Sunglasses detection device and face center position detection device Expired - Fee Related JP4739870B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005257168A JP4739870B2 (en) 2005-09-05 2005-09-05 Sunglasses detection device and face center position detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005257168A JP4739870B2 (en) 2005-09-05 2005-09-05 Sunglasses detection device and face center position detection device

Publications (2)

Publication Number Publication Date
JP2007072627A JP2007072627A (en) 2007-03-22
JP4739870B2 true JP4739870B2 (en) 2011-08-03

Family

ID=37934025

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005257168A Expired - Fee Related JP4739870B2 (en) 2005-09-05 2005-09-05 Sunglasses detection device and face center position detection device

Country Status (1)

Country Link
JP (1) JP4739870B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11516042B2 (en) 2018-07-19 2022-11-29 Panasonic Intellectual Property Management Co., Ltd. In-vehicle detection system and control method thereof

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007248749A (en) * 2006-03-15 2007-09-27 Pioneer Electronic Corp Device, method and program for adjusting display screen, and recording medium
JP2009219972A (en) 2007-03-20 2009-10-01 Denso Corp Method for producing catalyst material
JP2009219971A (en) 2007-03-20 2009-10-01 Denso Corp Ceramic honeycomb structure
JP4992773B2 (en) 2007-03-20 2012-08-08 株式会社デンソー Catalyst material
JP5251021B2 (en) * 2007-07-19 2013-07-31 株式会社デンソー Display screen adjustment device
JP5359266B2 (en) * 2008-12-26 2013-12-04 富士通株式会社 Face recognition device, face recognition method, and face recognition program
JP5399887B2 (en) * 2009-12-28 2014-01-29 本田技研工業株式会社 Vehicle periphery monitoring device
US8411907B2 (en) 2010-06-15 2013-04-02 International Business Machines Corporation Device function modification method and system
JP2012181628A (en) * 2011-02-28 2012-09-20 Sogo Keibi Hosho Co Ltd Face detection method, face detection device, and program
US10176785B2 (en) 2016-05-17 2019-01-08 International Business Machines Corporation System and method of adjusting a device display based on eyewear properties
JP6939580B2 (en) 2018-01-10 2021-09-22 株式会社デンソー Image synthesizer for vehicles

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535992A (en) * 1991-07-26 1993-02-12 Sharp Corp Alarming device
JP2004078749A (en) * 2002-08-21 2004-03-11 Nissan Motor Co Ltd Face feature amount detection device
JP2005011097A (en) * 2003-06-19 2005-01-13 Toyota Central Res & Dev Lab Inc Face existence determining device and face existence determining program
JP2005178473A (en) * 2003-12-17 2005-07-07 Denso Corp Interface for in-vehicle equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535992A (en) * 1991-07-26 1993-02-12 Sharp Corp Alarming device
JP2004078749A (en) * 2002-08-21 2004-03-11 Nissan Motor Co Ltd Face feature amount detection device
JP2005011097A (en) * 2003-06-19 2005-01-13 Toyota Central Res & Dev Lab Inc Face existence determining device and face existence determining program
JP2005178473A (en) * 2003-12-17 2005-07-07 Denso Corp Interface for in-vehicle equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11516042B2 (en) 2018-07-19 2022-11-29 Panasonic Intellectual Property Management Co., Ltd. In-vehicle detection system and control method thereof

Also Published As

Publication number Publication date
JP2007072627A (en) 2007-03-22

Similar Documents

Publication Publication Date Title
JP4739870B2 (en) Sunglasses detection device and face center position detection device
JP4307496B2 (en) Facial part detection device and program
JP4445454B2 (en) Face center position detection device, face center position detection method, and program
JP4845698B2 (en) Eye detection device, eye detection method, and program
JP4825473B2 (en) Face orientation discrimination device
JP2005327009A (en) Image correction device
US20080226139A1 (en) Eyelid detection apparatus, eyelid detection method and program therefor
JP2008269182A (en) Image processing method, image processor, image processing system, and computer program
JP2005165984A (en) Method, system and program for detecting vertex of human face
JP2016189135A (en) Recognition device, recognition method, and recognition program
KR20180063843A (en) Image processing apparatus, image processing method, and recording medium
JP6098133B2 (en) Face component extraction device, face component extraction method and program
JP2012068948A (en) Face attribute estimating apparatus and method therefor
TWI466070B (en) Method for searching eyes, and eyes condition determining device and eyes searching device using the method
JP4878273B2 (en) Glasses detection device, image processing device, glasses detection method, and computer program
JP2005165983A (en) Method for detecting jaw of human face, jaw detection system, and jaw detection program
JP5172995B2 (en) Face orientation discrimination device and computer program
JP4895876B2 (en) Eye detection apparatus and program
US9082002B2 (en) Detection device and detection method
JP4831344B2 (en) Eye position detection method
JP4852454B2 (en) Eye tilt detection device and program
JP2004030006A (en) Eye detection apparatus, eye detection program, recording medium for recording the program, and eye detection method
JP5093540B2 (en) Eye position detection method and detection system
JP4831361B2 (en) Eye position detection method and detection system
JP2003256815A (en) Method for capturing fingerprint image and device for inputting fingerprint image and its program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080521

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110328

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

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

R151 Written notification of patent or utility model registration

Ref document number: 4739870

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees