JPH03202045A - Detecting device for state of driver - Google Patents

Detecting device for state of driver

Info

Publication number
JPH03202045A
JPH03202045A JP1338671A JP33867189A JPH03202045A JP H03202045 A JPH03202045 A JP H03202045A JP 1338671 A JP1338671 A JP 1338671A JP 33867189 A JP33867189 A JP 33867189A JP H03202045 A JPH03202045 A JP H03202045A
Authority
JP
Japan
Prior art keywords
iris
driver
coordinate
window
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
JP1338671A
Other languages
Japanese (ja)
Other versions
JP2932551B2 (en
Inventor
Yasushi Ueno
裕史 上野
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.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor Co Ltd
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 Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP1338671A priority Critical patent/JP2932551B2/en
Publication of JPH03202045A publication Critical patent/JPH03202045A/en
Application granted granted Critical
Publication of JP2932551B2 publication Critical patent/JP2932551B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Eye Examination Apparatus (AREA)

Abstract

PURPOSE:To detect a driver's nap by detecting an iris part from a binarized image of a fact in the course of driving, and specifying an iris center position. CONSTITUTION:For instance, an infrared electronic flash 1 irradiates a face part of a driver in the front direction to the driver. A television camera 3 photographs the face part irradiated with this infrared-ray. A timing command circuit 5 matches the timings of both of them. A photographed input image is stored in an image memory 9 through an A/D converter 7. An eyeball existence position prescribing circuit 11 binarizes this stored input image data by some threshold, and prescribes an existence position area of an iris. An iris detecting circuit 13 processes the image data of the image memory 9 in this iris and detects the iris center. A nap and looking-aside deciding circuit 15 decides whether a driver's nap and looking-aside, etc., exist or not from the center position of this iris. When a nap or looking-aside is decided, an alarm output circuit 17 raises an alarm.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は運転者の目の虹彩状態を検出して居眠り等を
検出する運転者の状態検出装置に関す(従来の技術) 従来の運転者の状態検出装置、例えば居眠り検出装置と
しては特開昭60−158303号公報等に記載された
ものがある。この種の居眠り検出装置は赤外ストロボを
用いて運転者の顔面に赤外光を照射し、その反射光を二
次元撮像素子で画像として検出した後、該画像を2値化
し、これによる明暗領域の画像パターンから目の位置の
動きを検出して運転者が居眠りしているか否かを判定す
るものである。
[Detailed Description of the Invention] [Objective of the Invention] (Industrial Application Field) This invention relates to a driver condition detection device that detects the condition of the iris of the driver's eyes to detect dozing off, etc. (compared to the conventional technology). ) A conventional driver condition detection device, for example, a drowsiness detection device, is described in Japanese Patent Application Laid-Open No. 158303/1983. This type of drowsiness detection device uses an infrared strobe to irradiate infrared light onto the driver's face, detects the reflected light as an image with a two-dimensional image sensor, and then binarizes the image. The system detects the movement of the eye position from the image pattern of the area to determine whether the driver is dozing off.

(発明が解決しようとする課題) しかしながら、このような居眠り検出装置では、2値化
された顔面画像の明暗領域の形状から目の位置を認識す
るものであるため目のおおよその位置が認識できるにす
ぎず、目か開いているのか閉じているかまでは判別でき
ない。従って顔の姿勢を崩さないまま居眠りをしていた
場合には運転者の居眠り検出がてきないという問題があ
った。
(Problem to be Solved by the Invention) However, such a dozing detection device recognizes the position of the eyes from the shape of the bright and dark areas of a binarized facial image, so it is not possible to recognize the approximate position of the eyes. It is not possible to tell whether the eyes are open or closed. Therefore, if the driver falls asleep without changing his facial posture, there is a problem in that the driver's dozing cannot be detected.

そこでこの発明は、虹彩部を検出する領域の暗領域部分
の面積を統計的手法て処理し、運転者の虹彩中心位置を
検出してより正確な判定を行うことができるようにした
運転者の状態検出装置の提供を目的とする。
Therefore, this invention processes the area of the dark area in the area where the iris is detected using a statistical method to detect the center position of the driver's iris, making it possible to make more accurate judgments about the driver's iris. The purpose is to provide a state detection device.

[発Illの構成] (課題を解決するための手段) 上記課題を解決するためにこの発明は、運転者の目を含
む顔画像を入力する画像入力手段CL1と、この画像入
力手段CLIから送出される入力画像を2値化する2値
化手段CL2と、この2値化手段による2@化画像にお
いて運転者の虹彩部を検出する領域を設定する領域設定
手段CL3と、この領域設定手段CL3によって設定し
た領域内において暗鎮域部分の面積を統計的手法で処理
し運転者の虹彩中心位置を検出する虹彩中心検出手段C
L4と、この虹彩中心検出手段CL4による検出結果か
ら運転者の状態を判定する判定手段CL5とを備える構
成とした。
[Structure of Sending Ill] (Means for Solving the Problems) In order to solve the above problems, the present invention provides image input means CL1 for inputting a face image including the driver's eyes, and an image input means CLI for sending out images from the image input means CLI. A binarizing means CL2 for binarizing the input image to be input, an area setting means CL3 for setting an area for detecting the driver's iris in the binarized image by the binarizing means, and this area setting means CL3. iris center detection means C for detecting the driver's iris center position by statistically processing the area of the darkened area within the area set by
L4, and a determining means CL5 that determines the condition of the driver from the detection result by the iris center detecting means CL4.

(作用) 上記横取によれば2値化画像から虹彩部を検出する領域
を設定し、その領域内において虹彩中心検出手段CL4
により暗領域部分の面積を統計的手法で処理し、運転者
の虹彩中心位置を検出することができる。従って判定手
段CL5により運転者の状態を判定する場合に虹彩中心
位置の特定により、より正確な判定を行なうことができ
る。
(Function) According to the above-described interception, an area for detecting the iris part is set from the binarized image, and within the area, the iris center detection means CL4
By statistically processing the area of the dark region, it is possible to detect the center position of the driver's iris. Therefore, when determining the driver's condition by the determining means CL5, more accurate determination can be made by specifying the iris center position.

(実施例) 以下、この発明の実施例を図面に基づいて説明する。(Example) Embodiments of the present invention will be described below based on the drawings.

第2図はこの発明の一実施例に係る車両運転者の状態検
出装置の構成図、第3図は第2図の構成図に基づくフロ
ーチャートを示すものである。
FIG. 2 is a block diagram of a vehicle driver condition detection device according to an embodiment of the present invention, and FIG. 3 is a flowchart based on the block diagram of FIG. 2.

第2図に示すように、この状態検出装置は、インストル
メントパネル(図示せず)内の運転者に対する正面方向
に、運転者の顔部分を照射する赤外ストロボ1と、この
赤外ストロボ1の赤外光て照射される顔部分を撮影する
画像入力手段CLIとしてのTVカメラ3と、前記赤外
ストロボ1の発光とTVカメラ3の画像入力とのタイミ
ングを合せるタイミング指令回路5とを備えている。そ
して、赤外ストロボ1にタイミング指令回路5からスト
ロボ発光指令が出力されると赤外ストロボ1が発光して
運転者の顔部分を照射し、これと同時にTVカメラ3に
対し画像入力指令が出力され、これにより赤外光で照射
された顔部分を撮像するようになっている。
As shown in FIG. 2, this state detection device includes an infrared strobe 1 that illuminates the driver's face in an instrument panel (not shown) in the front direction toward the driver; A TV camera 3 serving as an image input means CLI for photographing a facial part irradiated with infrared light, and a timing command circuit 5 for synchronizing the timing of the light emission of the infrared strobe 1 and the image input of the TV camera 3. ing. When a strobe light emission command is output from the timing command circuit 5 to the infrared strobe 1, the infrared strobe 1 emits light and illuminates the driver's face, and at the same time an image input command is output to the TV camera 3. This allows the device to image the part of the face illuminated with infrared light.

TVカメラ3の入力画像は、第6図に示すように、横方
向520画素、縦方向500画素からなり、縦方向に顔
部分がほぼいっばいになるように画角が調整されている
As shown in FIG. 6, the input image of the TV camera 3 consists of 520 pixels in the horizontal direction and 500 pixels in the vertical direction, and the angle of view is adjusted so that the face portion is almost flush with the image in the vertical direction.

TVカメラ3には、撮影した入力画像−ぐデジタル量に
変換するA/D変換器7を介して画像メモリ9が接続さ
れている。この画像メモリ9はTVカメラ3の入力画像
データを格納するものである。
An image memory 9 is connected to the TV camera 3 via an A/D converter 7 that converts captured input images into digital quantities. This image memory 9 stores input image data from the TV camera 3.

画像メモリ9には、該画像メモリ9に格納された入力画
像データに基づいて眼球の存在位置領域を規定する眼球
存在位置規定回路11が接続され、さらに、眼球存在位
置規定回路11て規定された領域内にある画像メモリ9
の画像データを処理して眼の虹彩部分を検出する虹彩検
出回路13が接続されている。
The image memory 9 is connected to an eyeball location defining circuit 11 that defines an eyeball location region based on the input image data stored in the image memory 9, and further defines an eyeball location region. Image memory 9 within the area
An iris detection circuit 13 is connected to the iris detection circuit 13 which processes the image data of and detects the iris part of the eye.

また、虹彩検出回路13には、該虹彩検出回路13での
虹彩の検出結果から運転者の居眠りやわき見等の有無を
判定する居眠りわき見判定回路15が接続され、さらに
、居眠りわき見判定回路15で運転者の居眠りわき見が
判定されたときの指令により警報を発する警報出力回路
17が接続されている。
Further, the iris detection circuit 13 is connected to a drowsy and inattentive judgment circuit 15 that determines whether the driver is dozing off, looking away, etc. from the iris detection result of the iris detection circuit 13. An alarm output circuit 17 is connected which issues an alarm in response to a command when it is determined that the driver is falling asleep and looking inattentive.

前記眼球存在位置規定回路11は、入力画像をあるしき
い値で2値化する2値化手段CL2と、2値化画像にお
いて虹彩部分を検出する領域を設定する領域設定手段C
L3とを構成するものである。
The eyeball existing position determining circuit 11 includes a binarization unit CL2 that binarizes an input image using a certain threshold value, and an area setting unit C that sets an area for detecting the iris portion in the binarized image.
It constitutes L3.

また、虹彩検出回路13は虹彩中心検出手段CL4を構
成し、居眠りわきみ判定回路15は判定手段CL5を構
成するものである。
Further, the iris detection circuit 13 constitutes the iris center detection means CL4, and the dozing/distractedness determination circuit 15 constitutes the determination means CL5.

つぎに、第3図、第4図のフローチャートに基づいて作
用を説明する。なお、第4図のフローチャートがこの発
明実施例の主体を成すものであるが、前提として、第3
図のフローチャートの初めから説明する。
Next, the operation will be explained based on the flowcharts of FIGS. 3 and 4. Although the flowchart in FIG. 4 constitutes the main body of the embodiment of this invention, it is assumed that the third
The explanation will be given from the beginning of the flowchart in the figure.

まず、ステップS1て赤外ストロボ1の発光と同期して
TVカメラ3によって撮影された運転者の顔部分の画像
をA/D変換回路7でデジタル信号に変換して画像メモ
リ9に格納する。つぎに、ステップS2で画像メモリ9
に格納されたん力画像データを眼球存在位置規定回路1
1に取り込み、あるしきい値で2値化する。これは、顔
部分の明暗をはっきりさせるためてあり、2値化しきい
値は眼球部を抽出できるレベルに設定されている。
First, in step S1, an image of the driver's face photographed by the TV camera 3 in synchronization with the light emission of the infrared strobe 1 is converted into a digital signal by the A/D conversion circuit 7 and stored in the image memory 9. Next, in step S2, the image memory 9
The force image data stored in the eyeball position determining circuit 1
1 and binarized using a certain threshold. This is done to clarify the brightness and darkness of the face, and the binarization threshold is set at a level that allows extraction of the eyeballs.

すなわち、ビデオ信号を256階調(0〜255)のデ
ジタルデータに変換し、白い部分を3255″、黒い部
分を“0′とし、あるスレッシュホールドレベルで2値
化して2値化画像J (x。
That is, the video signal is converted into digital data with 256 gradations (0 to 255), the white part is set to 3255'', the black part is set to 0', and binarized at a certain threshold level to create a binarized image J (x .

y)を得たものである。y) is obtained.

つぎに、ステップS3において、左右それぞれの眼球の
存在領域(ウィンドウ、第6図の点線で示す四角部分)
の横方向(X方向)の幅を決定する。ウィンドウが検出
されると、ウィンドウのX方向の幅内で眼の候補点を険
出しくステップS4)、次いて額を検出したか否かを判
別して(ステップS5)、第10図(a)、(b)に示
すバタンのどれかを決定する(ステップS6.S7)。
Next, in step S3, the areas where the left and right eyeballs exist (windows, rectangular areas indicated by dotted lines in FIG. 6)
Determine the width in the horizontal direction (X direction). When the window is detected, a candidate point of the eye is exposed within the width of the window in the X direction (step S4), and then it is determined whether the forehead has been detected (step S5). ), (b) is determined (steps S6 and S7).

ステップS8では両眼とウィンドウが設定されたか否か
が判別され、次いで虹彩中心検出が行なわれる(ステッ
プS9)。そして虹彩中心が検出されると虹彩中心から
乗員の居眠りわき見判定が行なわれる(ステップ510
)。
In step S8, it is determined whether or not both eyes and windows have been set, and then iris center detection is performed (step S9). Then, when the center of the iris is detected, a determination is made from the center of the iris that the occupant is drowsy and distracted (step 510).
).

次に、前記ステップS3の処理の詳細フローチャー1−
 (SETWIN処理)を第5図に示す。
Next, detailed flowchart 1- of the process of step S3
(SETWIN processing) is shown in FIG.

この処理は、顔の左右の髪の毛や顔の輪郭線等より顔の
幅を認識し、この顔の幅から眼球の存在領域のX方向の
幅を決定するものである。
This process recognizes the width of the face from the hair on the left and right sides of the face, the outline of the face, etc., and determines the width in the X direction of the area where the eyeballs exist from this width of the face.

まず、初めに、白いドツトのカウンタA1黒いドツトの
カウンタB1顔濃淡の黒い部分である眉や眼を検出する
カウンタC1眼鏡のフレーム判断手段CL7て利用する
カウンタDをクリアする。
First, a white dot counter A1, a black dot counter B1, a counter C1 for detecting the eyebrows and eyes, which are the black parts of the face, and a counter D used by the frame determining means CL7 of the glasses are cleared.

つぎに、ステップ5301で入力画像をX方向にラスタ
ー走査しく第10図において左から右へ走査するが、実
際の顔に対しては右から左へ走査していることになる。
Next, in step 5301, the input image is raster scanned in the X direction, from left to right in FIG. 10, but the actual face is scanned from right to left.

但し、説明上第10図の左側を顔の左側と称する。)、
黒ドツトか否かを判別する。そして、走査が頭の端に至
る等して最初の黒ドツトを険出したらステップ5303
へ移行し、白ドツトのカウンタAの値が0を越えている
か否かが判別される。乗員の背影が2値化によって白で
あることを前提にすると、初めての黒ドツトが検出され
る前には白ドツトがAラントされているから、ステップ
5304で黒ドツトのカウンタBをクリアする。
However, for the sake of explanation, the left side of FIG. 10 will be referred to as the left side of the face. ),
Determine whether it is a black dot or not. Then, when the scanning reaches the end of the head and the first black dot is exposed, step 5303
Then, it is determined whether the value of the white dot counter A exceeds 0 or not. Assuming that the passenger's back shadow is white due to binarization, the white dot is A-rated before the first black dot is detected, so the black dot counter B is cleared in step 5304.

ステップ5305で黒ドツトの個数をカウントし、黒ド
ツトが5回連続してカウントされたか否かが判別される
(ステップ5306)。黒ドツトのカウントが1個目で
あればステップ5308へ移行し、この時点では左側の
X座標は検出されていないため5309と移行し、そし
てステップ5310へ移行し、X方向はすべて走査され
たか否かかtlJ断されるが(X≧511)、まだすべ
ては走査していないのでステップ5301へ移行し、X
方向の走査値が加算される。そして黒色ドツトを検出(
2続けていればステップ5302,5303.5305
と移行し、再びステップ5306の判断か行なわれる。
The number of black dots is counted in step 5305, and it is determined whether black dots have been counted five times in a row (step 5306). If the black dot count is 1, the process moves to step 5308. At this point, the left X coordinate has not been detected, so the process moves to 5309, and then to step 5310, where it is determined whether the entire X direction has been scanned. tlJ is disconnected (X≧511), but since not everything has been scanned yet, the process moves to step 5301 and
The directional scan values are added. Then detect a black dot (
If 2 continues, steps 5302, 5303, 5305
Then, the determination in step 5306 is made again.

ここで、黒ドツトBの個数が5回連続しているときは、
顔の右側部分の髪の毛のX方向におけるほぼ中央部であ
ると判定し、そのときのY座標MEYを記憶する(ステ
ップ5307)。
Here, when the number of black dots B is 5 times in a row,
It is determined that this is approximately the center of the hair on the right side of the face in the X direction, and the Y coordinate MEY at that time is stored (step 5307).

つぎに、ステップ330gで眼球の存在領域の左側X座
標を検出したか否かが判別される。このときは、まだ左
側X座標は検出されていないから、ステップ530って
白ドツトのカウンタAをクリアしてステップ5310へ
移行する。
Next, in step 330g, it is determined whether the left X coordinate of the eyeball presence area has been detected. At this time, the left side X coordinate has not been detected yet, so in step 530 the white dot counter A is cleared and the process moves to step 5310.

ステップ5310では再びX方向をすべて走査したか否
かが判別される。このときはX方向のすべては走査され
ていないのでステップ5301へ戻り、走査が例えば顔
の白い部分に至っていればステップ5302を経てステ
ップ5311へ移行し、白ドツトの個数をカウントする
。そして、ステップ5312で、最初の白ドツトは黒ド
ツトが10回以上連続してカウントされた後であるか否
かか判別される。
In step 5310, it is again determined whether the entire X direction has been scanned. At this time, since the entire area in the X direction has not been scanned, the process returns to step 5301. If the scanning has reached, for example, a white part of the face, the process moves to step 5311 via step 5302, and the number of white dots is counted. Then, in step 5312, it is determined whether the first white dot is counted after black dots have been counted 10 or more times in succession.

この判別はY方向が額の位置で左側部分の髪の毛を全部
カウントしたか否かを判別するものである。
This determination is to determine whether or not all the hair on the left side has been counted when the Y direction is the position of the forehead.

ここで黒ドツトが10回以上カウントされた後で、額の
幅に相当する白「ットが190以上検出されたときは、
ステップ5313からステップ5314へ移行し、最初
の白ドツトか否かが判別される。ここで、最初の白ドツ
トであれば、ウィンドウの左側X座標の候補点X1とし
てX−Xlをメモリに3己憶する(ステップS 315
)、(第7図)。
After the black dots have been counted 10 times or more, if 190 or more white dots corresponding to the width of the forehead are detected,
The process moves from step 5313 to step 5314, where it is determined whether or not it is the first white dot. Here, if it is the first white dot, X-Xl is stored in the memory as the candidate point X1 at the left X coordinate of the window (step S315).
), (Figure 7).

このとき、ステップ5321て、眉や眼の黒ドツトのカ
ウンタCか0を越えているか否かが判別される。ここで
、Y方向が額の位置であれば白色ドツトが続くはずであ
るから黒ドツトはカウントされずステップ5310へ移
行し、X方向はすべて走査されたか否かが判別される。
At this time, in step 5321, it is determined whether the counter C of the black dots on the eyebrows and eyes exceeds 0. Here, if the Y direction is the position of the forehead, white dots should continue, so the black dots are not counted and the process moves to step 5310, where it is determined whether all the X directions have been scanned.

このときは未たX方向はすべて走査されていないのでス
テップ5301へ戻り、前記と同様な処理が繰返し実行
される。
At this time, since the entire X direction has not been scanned yet, the process returns to step 5301 and the same process as described above is repeated.

また、ステップ5321で黒ドツトCがカウントされて
いるときには、前記候補点X1を検出したY座標が額で
はなく、例えばそれよりも下の眉等の位置におけるもの
であるからステップ3322で黒ドツトをクリアし、ウ
ィンドウのX方向左側の候補点X1をキャンセルする(
ステップ5323)。
Furthermore, when the black dots C are counted in step 5321, the Y coordinate at which the candidate point Clear and cancel candidate point X1 on the left side of the window in the X direction (
Step 5323).

候補点X1が検出できなかったY座標てX方向が全てス
キャンされればカウンタA、B、Cがクリアされ、Y座
標が下方へ1つずらされる(ステップ5310,532
8,5329)。そして、上記のXlの検索が同様にし
て行なわれ、Y方向が全てスキャンされれば(ステップ
5330)、Xlが検出できないものとしくステップ5
336)、処理C,!終了する。Xlが検出てきないと
きは乗員がわき見をしたり、下を向いているような状態
を意味する。
If the entire X direction is scanned with the Y coordinate where the candidate point
8,5329). Then, the above search for Xl is performed in the same manner, and if the entire Y direction is scanned (step 5330), it is assumed that Xl cannot be detected, and step 5
336), Processing C,! finish. When Xl is not detected, it means that the occupant is looking aside or looking down.

ところで、乗員が眼鏡を装着している場合には、眼鏡フ
レームの下部においてもX方向に黒ドツトが10回以上
連続することがある。そして、眼鏡フレームの下部にお
ける黒ドツトの連続であれば黒ドツトが10回以上連続
した後、白ドツトが190以上連続することはない。そ
こて、眼鏡フレムの左側の右端(X2)をウィンドウの
候補点として検出した後、白ドツトか190回以上連続
しない場合には、ステップ5313からステップ531
6へ移行して(X2−5、Y軸MEY)の点(眼鏡の片
側下フレームX方向略中央)からY方向上方のドツトを
検索し、黒色ドツトの個数をカウントする(ステップ5
317)。そして、ステップ5318てドツトを20回
以上カウントしたか否かが判別され、20回以上カウン
トしておれば、黒ドツトが10回以上カウントされたか
否かが判別される(ステップS 319)。これは、第
9図(b)のように眼鏡をかけていればフレームのP1
位置から20ドツト以上のところに眼があり、そこで眼
を検出して黒ドツトが10回以上続き、眼鏡なしの場合
は眼と眉とをフレームと見たてて同図(a)のようにP
2位置から上方へ20ドツト以上カウントすると、そこ
から黒ドツトが10回以上続くことはなく区別できるか
らである。ここで黒ドツトが10回以上あるときは、前
記X座標の候補点X2を基にフレームの大きさを考慮し
てXlをウィンドウの左側のX座標として確定する(ス
テップ5320)。黒ドツトが10回以上ないときには
、X座標を確定せずにステップ5310からステップ5
301へ戻り、前記と同様の処理を繰返す。
By the way, when the occupant wears glasses, black dots may appear ten or more times in a row in the X direction even at the bottom of the glasses frame. If black dots are continuous at the bottom of the eyeglass frame, there will be no more than 190 consecutive white dots after 10 or more consecutive black dots. Then, after detecting the right edge (X2) of the left side of the eyeglass frame as a candidate point for the window, if the white dot does not continue 190 times or more, step 5313 to step 531
6, search for dots above the point in the Y direction from the point (X2-5, Y axis MEY) (approximately the center of the lower frame on one side in the X direction) and count the number of black dots (step 5).
317). Then, in step S318, it is determined whether the dots have been counted 20 times or more. If the dots have been counted 20 times or more, it is determined whether the black dots have been counted 10 times or more (step S319). If you wear glasses as shown in Figure 9(b), this will be the P1 of the frame.
If there is an eye at least 20 dots from the position, the eye is detected and the black dot continues at least 10 times, and if the person does not wear glasses, the eye and eyebrows are treated as a frame, as shown in Figure (a). P
This is because if 20 or more dots are counted upward from the 2nd position, the black dots will not continue more than 10 times from that point and can be distinguished. If there are 10 or more black dots, Xl is determined as the X coordinate on the left side of the window based on the candidate point X2 of the X coordinate, taking into account the size of the frame (step 5320). If there are no black dots 10 or more times, the steps from step 5310 to step 5 are performed without determining the X coordinate.
The process returns to 301 and the same process as described above is repeated.

ウィンドウの左側のX座標X1が第8図、第9図(b)
のように確定され、X方向への走査によって再び右の頭
髪の黒ドツト、あるいは眼鏡フレムの右側の黒ドツトを
検出すると、ステップ5324でその個数をカウントし
、黒ドツトが5回連続してカウントされたか否かが判別
される(ステップ5325)。ここで、黒ドツトが5回
連続してカウントされると、第8図のようにウィンドウ
の右側X座標XX2としてX−XX2をメモリに記憶す
る。なる、ステップ8316〜5320によってXlが
記憶されているときは眼鏡の右側フレームの左端がXX
Iとして記憶され、このXX1に基づきXX2を記憶す
る。
The X coordinate X1 on the left side of the window is shown in Figures 8 and 9 (b).
When a black dot on the right hair or a black dot on the right side of the glasses rim is detected again by scanning in the X direction, the number is counted in step 5324, and the number of black dots is counted five times in a row. It is determined whether or not it has been performed (step 5325). Here, when the black dots are counted five times in succession, X-XX2 is stored in the memory as the right X coordinate XX2 of the window as shown in FIG. If Xl is stored in steps 8316 to 5320, the left edge of the right frame of the glasses is XX.
XX2 is stored based on this XX1.

ステップ5325で、黒ドツトが5回連続してカウント
されないときは、乗員が横を向いていたり、顔か斜めに
なっているようなときであり、ステップ5327て白ド
ツトをクリアし、ステップ5310へ移行する。このと
き、音声等で乗員に姿勢を正すように警告することもて
きる。
If the black dots are not counted 5 times in a row in step 5325, this is because the occupant is looking to the side or his/her face is at an angle. Transition. At this time, an audio warning may be issued to the occupant to correct his or her posture.

このようにして、ウィンドウの左側X座標X1と同右側
X座標XX2 (又はXX1)が検出されると、ステッ
プ3331へ移行して、前記ウィンドウの左右のX座標
XI、XX2 (又はxxl)を検出した縦方向のY座
標をHABAYとして記憶し、ステップ5332で、ウ
ィンドウを左右の眼に分割するためのX座標を求める(
第8図参照)この分割は、例えば眼鏡をかけていない場
合を例とすれば次式によって行われる。すなわち、XI
由センターXC −X1+ + (XX2−XI)/21左眼ウィンドウ
の左側X座標−X1 左眼ウインドウの右側X座標=X2 XC−25 右眼ウィンドウの左側X座標−XXI −XC+25 右眼ウィンドウの右側X座標−XX2 つぎに、ステップ5333およびステップ5335にお
いて、左、右ウィンドウのそれぞれのY座標を求めるW
INSUBへ移行する(ステップ3334)。
In this way, when the left X coordinate X1 and the right X coordinate XX2 (or XX1) of the window are detected, the process moves to step 3331, and the left and right X coordinates XI, XX2 (or xxl) of the window are detected. The vertical Y coordinate obtained is stored as HABAY, and in step 5332, the X coordinate for dividing the window into left and right eyes is determined (
(See FIG. 8) This division is performed using the following equation, for example, in the case where no glasses are worn. That is, XI
center XC -X1+ + (XX2-XI)/21 Left side X coordinate of left eye window - X1 Right side X coordinate of left eye window = X2 X coordinate - XX2 Next, in steps 5333 and 5335, the Y coordinates of the left and right windows are determined by W.
The process moves to INSUB (step 3334).

上記のように、左右ウィンドウのX座標XI。As above, the X coordinates XI of the left and right windows.

X2  XXI、XX2が検出されると、第3図のフロ
ーチャートのステップS4へ移行して、ウィンドウのX
方向の幅内で眼の候補点を検出し、額を検出したか否か
を判別して(ステップS5)、第10図(a)、(b)
に示すパターン1乃至10のどれかを決定する(ステッ
プS6およびS7)第6図は上記ステップS4乃至ステ
ップS7の詳細フローチャート(WINSUB処理)を
示すものである。
When X2 XXI and XX2 are detected, the process moves to step S4 of the flowchart in FIG.
A candidate point for the eye is detected within the width of the direction, and it is determined whether or not the forehead has been detected (step S5).
(Steps S6 and S7) FIG. 6 shows a detailed flowchart (WINSUB processing) of steps S4 to S7.

この処理は、ウィンドウのY方向の座標を決定するもの
で、左右それぞれの眼において行われる。
This process determines the coordinates of the window in the Y direction, and is performed for each eye.

まず、ステップ5401乃至ステップ5403で、例え
ば左側ウィンドウの1列分、すなわち、左側X座標X1
から右側X座標X2までを走査し黒ドツトの個数Eをカ
ウントする。つぎに、カウントされた黒ドツトの個数E
が最大個数Emax(前回までの処理で最大個数をいう
。)以上か否かが判別され(ステップ5404)、今回
の処理のカウント値が最大個数Emax以上の場合は、
その個数Eを最大個数Ema xとして記憶する(ステ
ップS 405)。その後カウンタEはクリアされ(ス
テップS42]、)、Y方向へ300ドツトまで走査し
たか、すなわち、頬に至るまで走査したか否かが判別さ
れ(ステップ5422)、Y方向・\300ドツトまで
走査されていなければ、Emax保管の上記ステップが
繰返され、第10図(b)のパターン7のような場合は
眉と眼との双方のEmaxか保管される。
First, in steps 5401 to 5403, for example, one column of the left window, that is, the left X coordinate
The area from to the right side X coordinate X2 is scanned and the number E of black dots is counted. Next, the number of black dots counted E
It is determined whether or not the count value of the current process is greater than or equal to the maximum number Emax (the maximum number in the previous processing) (step 5404), and if the count value of the current processing is greater than or equal to the maximum number Emax,
The number E is stored as the maximum number Emax (step S405). Thereafter, the counter E is cleared (step S42), and it is determined whether the scan has been performed up to 300 dots in the Y direction, that is, whether it has been scanned up to the cheek (step 5422), and it is determined whether the scan has been performed up to \300 dots in the Y direction. If not, the above steps of Emax storage are repeated, and in a case like pattern 7 in FIG. 10(b), Emax of both eyebrows and eyes are stored.

なお、ステップ5422ての300ドツトは固定値であ
るが、これ以下のドツト数でもよく、又、頭部先端位置
の検出により適数を自動的に決めることもできる。
Although 300 dots in step 5422 is a fixed value, a smaller number of dots may be used, or an appropriate number can be automatically determined by detecting the position of the tip of the head.

ステップ5404で、黒ドツトの個数Eが最大個数Em
ax未満の場合には、ステップ5406へ移行し、黒ド
ツトの個数Eが最大個数Emaxに対して80%以上減
ったか、すなわち、80%以上が白ドツトかを判定し、
80%以上が白ドツトの場合は、額、眉と眼の間、頬の
いづれかを検出したと判定してステップ5406から5
407へ移行し、そのときのY座標ZRを記憶する。
In step 5404, the number E of black dots is the maximum number Em
If it is less than ax, the process moves to step 5406, and it is determined whether the number E of black dots has decreased by 80% or more with respect to the maximum number Emax, that is, whether 80% or more are white dots,
If 80% or more are white dots, it is determined that one of the forehead, between the eyebrows and the eyes, or the cheek has been detected, and steps 5406 to 5 are performed.
The process moves to step 407, and the Y coordinate ZR at that time is stored.

そして、ステップ5408て、候補点が1個か否かが判
別され、ここで候補点が1個であれば額を5回検出した
か否かが判別される(ステップ5409)。この判断が
YESであれば、Y方向の走査がシr1部から額に至っ
たことを示すものであるため、候補点フラグを0FFI
、(ステップ5410)、ステップ5421へ移行して
黒ドツトのカウント数Eをクリアする。従って、頭部を
候補点として検出することがなくなる。
Then, in step 5408, it is determined whether there is one candidate point, and if there is one candidate point, it is determined whether the forehead has been detected five times (step 5409). If this judgment is YES, it indicates that the scanning in the Y direction has reached the forehead from the first part of the image, so the candidate point flag is set to 0FFI.
, (step 5410), the process moves to step 5421 and the count number E of black dots is cleared. Therefore, the head is not detected as a candidate point.

Y方向の走査が眉と眼との間であり候補点が眉の1個で
あるときはステップ5408から5409へ至りステッ
プ5409の判断がNoとなってステップ5421へ移
行する。Y方向の走査が頬であり、既に候補点が複数と
なっていれば、候補点フラグはONのままとなる(ステ
ップ5408)このように、ステップ8406〜541
0により候補点を検出したか否か、検出したのは額、眉
と眼との間、頬のいずれの走査におけるものなのかを区
別することができる。
If the scanning in the Y direction is between the eyebrows and the eyes and the candidate point is one of the eyebrows, the process proceeds from step 5408 to 5409, and if the determination in step 5409 is No, the process proceeds to step 5421. If the scan in the Y direction is the cheek and there are already multiple candidate points, the candidate point flag remains ON (step 5408).
0, it is possible to distinguish whether a candidate point is detected or not, and whether the detected point is scanned on the forehead, between the eyebrows and the eyes, or on the cheek.

ステップ5406て、白ドツトが80%以下であるとき
は、Y座標ZRを保管したか否かが判別され(ステップ
5411)、Y座標ZRを保管していれば、黒ドツトの
個数Eが10個以上増えたかが判別される(ステップ5
412)。ステップ5411でZRが保管されていなけ
ればY座標は例えば頭部にあるため、ステップ5421
.5422から5401ヘリターンする。
If the number of white dots is 80% or less in step 5406, it is determined whether or not the Y coordinate ZR has been stored (step 5411). If the Y coordinate ZR has been stored, the number E of black dots is 10. It is determined whether the increase is greater than or equal to (step 5)
412). If ZR is not saved in step 5411, the Y coordinate is located at the head, for example, so step 5421
.. Return from 5422 to 5401.

ZRを保管しステップ5412て黒ドツトの個数Eが1
0個以上増えている場合は、眉、眼、眼鏡フレームなど
眼球領域の可能性のある黒ドツトの多い部分であると判
定する。そして、ステップ5413で、候補点フラグは
ONか否かが判別され、ONの場合は候補点の数は1個
か否かが判別される(ステップ5414)。ここで、候
補点が1個であれば、ステップ5416で候補点に代表
される黒色領域の大きさのパラメータFを増加する。こ
のパラメータFが非常に大きい場合は、眼と眉とが影な
どで1つの部分と認識されており、候補点が実質的には
2個あると判断される(第10図(a)のパターン4参
照)。
Save ZR and in step 5412, the number of black dots E becomes 1.
If the number has increased by 0 or more, it is determined that the area has many black dots, which may be the eyeball area, such as the eyebrow, eye, or eyeglass frame. Then, in step 5413, it is determined whether the candidate point flag is ON or not, and if it is ON, it is determined whether the number of candidate points is one (step 5414). Here, if there is one candidate point, the parameter F for the size of the black area represented by the candidate point is increased in step 5416. If this parameter F is very large, the eyes and eyebrows are recognized as one part due to shadows, etc., and it is determined that there are actually two candidate points (the pattern shown in Fig. 10 (a)). (see 4).

ステップ5413において、候補点フラグがOFFのと
きには、候補点フラグをONにしくステップ5417)
、ステップ5418で候補点の検出回数をカウントアツ
プし、候補点検出カウント回数が2回以上か否かが判別
される(ステップ8419)。ここで、候補点検出カウ
ント数が2回以上でない場合は、ステップ5420で、
その時のY軸の座標をウィンドウを設定する基準座標Y
YSとして記憶する。
If the candidate point flag is OFF in step 5413, the candidate point flag is turned ON (step 5417).
, the number of candidate point detections is counted up in step 5418, and it is determined whether the number of candidate point detections is two or more (step 8419). Here, if the candidate point detection count is not 2 times or more, in step 5420,
The coordinate of the Y axis at that time is the standard coordinate Y that sets the window.
Store as YS.

このようにしてステップ5416およびステップ542
0の処理がなされると、つぎに、ステップ5421へ移
行して黒ドツトのカウンタEをクリアし、ステップ54
22へ移行する。
Thus steps 5416 and 542
When 0 is processed, the process moves to step 5421, where the black dot counter E is cleared, and step 54
Move to 22.

ステップ5422において、Y軸を0〜300ドツトま
で走査したか否かが判別され、Y座標を300ドツトま
で走査が終ると、ステップ5423へ移行し、先に5E
TWIN処理で記憶したHABAYの位置が220以下
であるか否かが判別される。HABAYの位置が220
以下であれば、額を検出していると判定しくステップ5
424)、ステップ5425で候補点検出カウント回数
が2回以上か、又は、パラメータFが70以上か否かが
判別される。
In step 5422, it is determined whether the Y-axis has been scanned from 0 to 300 dots, and when the Y-coordinate has been scanned to 300 dots, the process moves to step 5423, and first 5E is scanned.
It is determined whether the HABAY position stored in the TWIN process is 220 or less. HABAY position is 220
If it is below, it is determined that the forehead has been detected.Step 5
424), and in step 5425, it is determined whether the number of candidate point detection counts is 2 or more, or whether the parameter F is 70 or more.

候補点検出カウント回数が2回以上、又はパラメータF
が70以上の場合は、第10図で示すパターン4,7,
8.10のいずれかであるから第10図の表で示す設定
手段Aによってウィンドウ上のY座標をYYS+30、
ウィンドウ下のY座標をYYS+80に設定する(ステ
ップ5426)ステップ5425で、候補点検出カウン
ト回数が2回以下又はパラメータFが70以下の場合に
は、ステップ5427で候補点検出カウント回数が1回
か否かが判別され、候補点検出カウント回数が1回の場
合はパターン3であり、設定手段Bによってウィンドウ
上のY座標をYYS−20、ウィンドウ下のY座標をY
YS+30に設定する(ステップ3428)。
Candidate point detection count is 2 or more times or parameter F
is 70 or more, patterns 4, 7, and
8.10, so the Y coordinate on the window is set to YYS+30 by setting means A shown in the table of FIG.
Set the Y coordinate at the bottom of the window to YYS + 80 (Step 5426) If the number of candidate point detection counts is 2 or less or the parameter F is 70 or less in Step 5425, the number of candidate point detection counts is 1 or less in Step 5427. If the number of candidate point detection counts is 1, pattern 3 is selected, and setting means B sets the Y coordinate on the window to YYS-20 and the Y coordinate at the bottom of the window to Y.
Set to YS+30 (step 3428).

ステップ5427で候補点検出カウント回数が無い場合
には、検出不能であり(ステップ5429)、EXIT
する(ステップ3430)。この場合は、運転者が下を
向いている場合等と判断される。従って、所定の警告等
をしてもよい。
If there is no candidate point detection count in step 5427, detection is not possible (step 5429), and EXIT
(step 3430). In this case, it is determined that the driver is looking down. Therefore, a predetermined warning or the like may be given.

つぎに、ステップ5423において、HABAYの位置
が220以下でない場合には、額を検出していないと判
定して(ステップ5423)、ステップ5432て候補
点検出カウント回数が2回以上か否かが判別される。
Next, in step 5423, if the HABAY position is not 220 or less, it is determined that no forehead has been detected (step 5423), and in step 5432, it is determined whether the candidate point detection count is 2 or more. be done.

候補点検出カウント回数が2回以上の場合はバターン9
であり、設定手段Cによってウィンドウ上のY座標をY
YS−20、ウィンドウ下のY座標をYYS+30に設
定する(ステップ5428)ステップ5432て、候補
点検出カウント回数が2回以下の場合には、ステップ5
433て候補点検出カウント回数が1回か否かが判別さ
れ、候補点検出カウント回数が1回の場合は、その候補
点が眼鏡のフレームか否かが判別される(ステップ34
34)。ここで、パターン6のように候補点が眼鏡フレ
ームの場合は、ステップ5435へ移行する。ステップ
5435ては、標準座標YYSから上方へドツトを検索
し、黒ド/トを検出した位置YYS2を記憶する。そし
て、設定手段りによってウィンドウ上のY座標をYYS
2−35、ウィンドウ下のY座標をYYS 2+ 15
に設定する(ステップ3436)。
If the candidate point detection count is 2 or more, pattern 9
The setting means C sets the Y coordinate on the window to Y
YS-20, set the Y coordinate at the bottom of the window to YYS+30 (step 5428).If the number of candidate point detection counts is 2 or less in step 5432, step 5
At step 433, it is determined whether or not the candidate point detection count is 1. If the candidate point detection count is 1, it is determined whether the candidate point is a frame of glasses (step 34).
34). Here, if the candidate point is an eyeglass frame as in pattern 6, the process moves to step 5435. In step 5435, a dot is searched upward from the standard coordinates YYS, and the position YYS2 where the black dot is detected is stored. Then, set the Y coordinate on the window to YYS using the setting means.
2-35, Y coordinate at the bottom of the window is YYS 2+ 15
(step 3436).

ステップ5434て、眼鏡フレームではないと111別
された場合にはパターン5てあり、設定手段Eによって
ウィンドウ上のY座標をYYS−20、ウィンドウ下の
Y座標をYYS+3Qに設定する(ステップ5428)
If it is determined in step 5434 that it is not an eyeglass frame, pattern 5 is selected, and setting means E sets the Y coordinate on the window to YYS-20 and the Y coordinate at the bottom of the window to YYS+3Q (step 5428).
.

ステップ5433で、候補点検出カウント回数がない場
合にはパターン1てあり、ステップ5437へ移行し、
候補点が眼か、眼鏡フレームかを判別し、いづれでもな
い場合はステップ5438で標準座標YYSをステップ
5407で記憶したZR座標とし、設定手段Fによって
ウィンドウ上のY座標をYYS−20、ウィンドウ下の
Y座標をYYS+30に設定する(ステップ5428)
In step 5433, if there is no candidate point detection count, pattern 1 exists, and the process moves to step 5437.
It is determined whether the candidate point is an eye or an eyeglass frame, and if it is neither, in step 5438 the standard coordinate YYS is set to the ZR coordinate stored in step 5407, and the setting means F sets the Y coordinate on the window to YYS-20 and the bottom of the window. Set the Y coordinate of to YYS+30 (step 5428)
.

ステップ5437で、候補点が眼鏡フレームの場合には
パターン2であり、ステップ5439へ移行する。ステ
ップ5439ては、ZR座標から上方へドツトを検索し
、黒ドツトを検出した位置YYS2を記憶する。そして
、設定手段Gによってウィンドウ上のY座標をYYS2
−35、ウィンドウドのY座標をYYS+15に設定す
る(ステップ5436)。
In step 5437, if the candidate point is an eyeglass frame, pattern 2 is selected, and the process moves to step 5439. In step 5439, a dot is searched upward from the ZR coordinate, and the position YYS2 where a black dot is detected is stored. Then, the setting means G sets the Y coordinate on the window to YYS2.
−35, and the Y coordinate of the window is set to YYS+15 (step 5436).

つぎに、上記設定手段り、E、FおよびGを判別するた
めに行われるステップ5434およびステップ5437
の候補点か眼か眼鏡フレームであるかの判別の処理フロ
ーチャートを第12図に示す。
Next, the setting means performs steps 5434 and 5437 to determine E, F, and G.
FIG. 12 shows a processing flowchart for determining whether a candidate point is an eye or an eyeglass frame.

この処理は、額を検出できず、候補点が1個以下の場合
に実行される。
This process is executed when the forehead cannot be detected and the number of candidate points is one or less.

まず、ステップ5100乃至ステップ5300において
、候補点の黒ドツトから白ドツトへ変った点aから15
ドツト上の点から上方へ黒ドツトとなる点を検索し、ス
テップ5400で黒ドツトになるまでのカウントbが2
0回以上か否かが判別される。ここで、カウントbが2
0回以下の場合は第13図に示すようになっているため
、候補点は眼であると判定しくステップ5500)、ま
た、カウントbが20回以上の場合には、第14図に示
すようになっていると判別し、この候補点は眼鏡フレー
ムであると判定する(ステップ5600)。
First, in steps 5100 to 5300, from point a where the candidate point changes from a black dot to a white dot, 15
A point that becomes a black dot is searched upward from the point on the dot, and in step 5400, the count b until it becomes a black dot is 2.
It is determined whether the number of times is 0 or more. Here, count b is 2
If the count b is 0 or less, as shown in FIG. 13, the candidate point is determined to be an eye (step 5500), and if the count b is 20 or more, , and this candidate point is determined to be an eyeglass frame (step 5600).

そして、候補点か眼鏡フレームである場合における基準
座標YYS2は、候補点が1個か無いかによって次式で
算出される。すなわち、候補点か1個の場合には YYS2−YYS−15−b また、候補点がない場合には YYS2−ZR−15−b となる。
Then, the reference coordinate YYS2 in the case where the candidate point is the eyeglass frame is calculated by the following equation depending on whether there is one candidate point or no candidate point. That is, if there is one candidate point, YYS2-YYS-15-b, and if there is no candidate point, YYS2-ZR-15-b.

以上の処理を左右両眼において行うことによりそれぞれ
の眼のウィンドウが設定される。
By performing the above processing for both the left and right eyes, windows for each eye are set.

第10図、第11図に戻って整理すると、パターン1で
は、額および眉と眼の間が無いので、黒ドツトの切れ目
であるa点(−ZR)から設定手段Fによってウィンド
ウを設定する。
Returning to FIGS. 10 and 11, in pattern 1, since there is no space between the forehead, eyebrows, and eyes, a window is set by the setting means F from point a (-ZR), which is the break between the black dots.

パターン2は、パターン1と同様であるが、眼鏡を着用
しているためa点(−Z R)から15+bドツト上方
を基準座標YYS2とし、設定手段Gによってウィンド
ウを設定する。
Pattern 2 is similar to pattern 1, but since the user is wearing glasses, the reference coordinate YYS2 is set at 15+b dots above point a (-ZR), and the setting means G sets a window.

パターン3は、眉が薄いため候補点はa点(−YYS)
だけとなり、設定手段Bによってウィンドウが設定され
る。
For pattern 3, the eyebrows are thin, so the candidate point is point a (-YYS)
The window is set by the setting means B.

パターン4は、陰で眼と眉と眼鏡フレームの黒い部分か
一つに検出される場合で、眼鏡内が黒くなっているため
候補点はa点(−YYS)だけであるが、パラメータF
の値すから設定手段Aによってウィンドウが設定される
Pattern 4 is a case where one of the eyes, eyebrows, and the black part of the glasses frame is detected in the shadow, and since the inside of the glasses is black, the only candidate point is point a (-YYS), but the parameter F
The window is set by the setting means A based on the value of .

パターン5は、額の露出が無く眉と眼の間だlす検出す
るので、候補点はa点(−yys)の1点となり設定手
段Eによりウィンドウが設定される。
In pattern 5, the forehead is not exposed and the area between the eyebrows and the eyes is detected, so the candidate point is one point a (-yys), and the setting means E sets a window.

パターン6は、額が隠れている上、陰で眼と眉の黒い部
分が一つに検出される場合で、眉と眼の間を検出できず
、眼の下の白い部分を検出するため、候補点はa点とな
るが、眼鏡を着用しているのでYYS2を基準座標とし
て設定手段りによりウィンドウが設定される。
Pattern 6 is a case where the forehead is hidden and the black part of the eyes and eyebrows are detected together in the shadows, and the area between the eyebrows and eyes cannot be detected, but the white part under the eyes is detected. The candidate point is point a, but since the user is wearing glasses, a window is set by the setting means using YYS2 as the reference coordinate.

パターン7は、普通の形で候補点はa点(−YYS)と
b点の2点となり、a点を基準にして設定手段Aによっ
てウィンドウが設定される。
In pattern 7, there are two candidate points, point a (-YYS) and point b, in the usual form, and a window is set by setting means A with point a as a reference.

パターン8は、陰で眼と眉の黒い部分が一つに検出され
る場合で、額は検出されるが眉と眼の間が眼鏡フレーム
により検出できないため、候補点はa点とb点の2点と
なり、設定手段Aによってウィンドウが設定される。
Pattern 8 is a case where the black parts of the eyes and eyebrows are detected as one in the shadow, and although the forehead is detected, the area between the eyebrows and the eyes cannot be detected due to the glasses frame, so the candidate points are point a and point b. There are two points, and the setting means A sets the window.

パターン9は、額が隠れており眉と眼の間と眼と眼鏡フ
レームの下部の間を検出して候補点はa点とb点となり
設定手段Cによってウィンドウが設定される。
In pattern 9, the forehead is hidden and the areas between the eyebrows and the eyes and between the eyes and the lower part of the eyeglass frame are detected, and the candidate points are points a and b, and a window is set by the setting means C.

パターン10は、額、眉と眼の間および眼と眼鏡フレー
ムの下部の間を検出し、候補点がa点、b点およびC点
の3点となり、設定手段Aによってウィンドウが設定さ
れる。
The pattern 10 detects the forehead, between the eyebrows and the eyes, and between the eyes and the lower part of the eyeglass frame, and there are three candidate points, a point a, a point b, and a point C, and a window is set by the setting means A.

そして、第3図のステップS8で、両眼ともウィンドウ
が設定されたか否かが判別され、両眼ともウィンドウが
設定されると、ステップS9へ移行する。なお、片眼の
みの処理にすることも可能である。
Then, in step S8 of FIG. 3, it is determined whether windows have been set for both eyes, and if windows have been set for both eyes, the process moves to step S9. Note that it is also possible to process only one eye.

ステップS9では、2値化した画像J (x、y)から
上記で設定されたウィンドウ内に対する虹彩中心を検出
する処理が行われる。このときの眼の虹彩は、一般に暗
い円形領域として観測されるから、この円形領域を検出
してその領域面積を認識すれば、運転者の居眠りの有無
が判断てきる。
In step S9, a process is performed to detect the center of the iris within the window set above from the binarized image J (x, y). The iris of the eye at this time is generally observed as a dark circular area, so by detecting this circular area and recognizing its area, it can be determined whether the driver is dozing off.

なお、この実施例では顔幅を検出して領域の設定を行な
うから、例えば顔画像において背影が黒(夜間、あるい
はヘッドレストの色)であっても確実に検出することが
できる。
In this embodiment, since the face width is detected and the area is set, it is possible to reliably detect, for example, even if the back shadow in the face image is black (at night or the color of the headrest).

ステップS9の処理の詳細はこの発明実施例の中心をな
す第4図のフローチャートに基づいて説明する。
The details of the process in step S9 will be explained based on the flowchart of FIG. 4, which is the main feature of this embodiment of the invention.

まず、ステップ5800でウィンドウ内において虹彩候
補点の検出を行う。
First, in step 5800, iris candidate points are detected within the window.

この検出を先に説明する。This detection will be explained first.

第15図は、虹彩候補点の検出原理を示す説明図である
FIG. 15 is an explanatory diagram showing the principle of detecting iris candidate points.

今、ウィンドウ内の任意の点(x、y)を中心とする半
径Rの円を設定するとともに、点(x。
Now, set a circle with radius R centered at an arbitrary point (x, y) in the window, and set a circle with radius R centered at an arbitrary point (x, y) in the window.

y)を中心として放射状に4つの矩形を設定する。Set four rectangles radially around y).

この矩形は、円の内外方にそれぞれ2画素だけ延在する
ように設定される。そして、円より外方の矩形白抜き部
の明度値の総和と、円より内方の矩形ハツチング部の明
度値の総和との差δを求める。
This rectangle is set to extend by two pixels each on the inside and outside of the circle. Then, the difference δ between the total brightness values of the rectangular white areas outside the circle and the total brightness values of the rectangular hatched areas inside the circle is determined.

これを上記1モ意の点(x、y)においてRmin−R
maxまで行い、差δの所定値を△として求める。つぎ
に、点(Xや+、y)を中心として同様な演算を行い、
所定値△を記憶する。このような演算をウィンドウ内の
全画素点を中心として行い虹彩候補点としての所定値△
を出力する。
This is calculated as Rmin-R at the point (x, y) of the above 1 mo
The process is repeated up to max, and a predetermined value of the difference δ is determined as Δ. Next, perform similar calculations centering on points (X, +, y),
A predetermined value △ is stored. This kind of calculation is performed centering on all pixel points within the window, and a predetermined value △ is calculated as the iris candidate point.
Output.

これは、ウィンドウ内に虹彩が存在するとき、虹彩は他
の領域に比べて輝度が低い円形図形として検出され、虹
彩の中心に求められる上記差δが最大値をとるという原
理に基づいている。
This is based on the principle that when an iris exists within a window, the iris is detected as a circular figure with lower brightness than other areas, and the difference δ, which is determined at the center of the iris, takes the maximum value.

第16図は以上の処理のフローチャートを示すものであ
る。
FIG. 16 shows a flowchart of the above processing.

まず、ステップ5901で、ウィンドウ内を走査するカ
ウンターX、yをLにリセットする。なお、ここで設定
されたウィンドウの大きさは、X方向Mドツト、y方向
Nドツトとする。つぎに、ステップ5902で、虹彩検
出の中心座標の点J(x、y)が黒いか否かが判別され
、黒い場合はステップ5903へ移行し、検出半径Rを
Rminとする。つづいて、ステップ5904および5
905において、Δおよびpをリセットする。
First, in step 5901, counters X and y for scanning within the window are reset to L. Note that the window size set here is M dots in the X direction and N dots in the Y direction. Next, in step 5902, it is determined whether or not the center coordinate point J (x, y) of iris detection is black. If black, the process moves to step 5903, and the detection radius R is set to Rmin. Subsequently, steps 5904 and 5
At 905, Δ and p are reset.

つぎに、ステップ5906乃至5908で、具体的に白
い部分に囲まれた黒い円形領域として検出する。すなわ
ち、ステップ5906において、式の前半の4項J (
x+R+p、y)、J (x。
Next, in steps 5906 to 5908, a black circular area surrounded by a white part is specifically detected. That is, in step 5906, the first four terms J (
x+R+p,y), J(x.

y−R−p) 、  J (x−R−p、  y) 、
  J (x。
y-R-p), J (x-R-p, y),
J (x.

y+R+p)はそれぞれ中心座標(x、y)から半径R
+p離れた右、下、左、上の位置の明度を表わし、式の
後半の4項J (x+R−p−1,y)J (x、y−
R+p+1)、J (x−R+p+1、y)、J (x
、y+R−p−1)はそれぞれ中心座標(x、y)から
半径R−(p+1)離れた右、下、左、上の位置の明度
を表わしている。
y+R+p) is the radius R from the center coordinates (x, y), respectively.
It represents the brightness of the right, bottom, left, and top positions that are +p away, and the latter four terms of the equation J (x+R-p-1, y)J (x, y-
R+p+1), J (x-R+p+1, y), J (x
, y+R-p-1) represent the brightness at the right, bottom, left, and top positions, respectively, located a radius R-(p+1) from the center coordinates (x, y).

そしてステップ5907でpを1ずつ増加させp−1ま
で変化させてステップ5906乃至ステップ5908を
繰返し実行し、半径Rmfnにおける第15図の矩形白
抜き部の明度値総和(ステップ5906の式の前半4項
の和)と矩形ハツチング部の明度値総和(ステップ59
06の式の後半4項の和)の差δが所定値△として求め
られる(ステップS 910)。つぎに、ステップ59
11で、半?L Rm i n + 1として再度ステ
ップ59O4へ移行し、ステップ5906乃至ステップ
5908を繰返し実行することにより半径Rmin+1
としたときの矩形領域の明度差δを求める。
Then, in step 5907, p is increased by 1 and changed to p-1, and steps 5906 to 5908 are repeatedly executed. (step 59) and the sum of brightness values of the rectangular hatched part (step
The difference δ between the sum of the last four terms of the equation 06 is determined as a predetermined value Δ (step S910). Next, step 59
11 and a half? As L Rmin + 1, proceed to step 59O4 again, and repeat steps 5906 to 5908 to obtain the radius Rmin+1.
Find the brightness difference δ in the rectangular area when

この明度差δが第1回目の半径Rminについて演算さ
れた△よりも大きければ、その明度差δを所定値△とす
る。このような操作を半径Rmaxまで繰返して行い、
任意の点(x、y)についての所定明度差Δが求まる(
ステップS 912)。
If this brightness difference δ is larger than Δ calculated for the first radius Rmin, the brightness difference δ is set to a predetermined value Δ. Repeat this operation until the radius Rmax,
The predetermined brightness difference Δ for any point (x, y) is found (
Step S 912).

これは、検出する虹彩の半径は、個人あるいはカメラと
乗員の距離によって異るため、検出半径にあるゾーン(
Rm i n−Rma x)を設けるためである。
This is because the radius of the iris to be detected varies depending on the distance between the individual or the camera and the occupant, so the zone (
This is to provide Rmin-Rmax).

以下、この処理を、Xを1〜Mまで、yを1〜Nまでウ
ィンドウ全体に亘って行う。このような処理によって求
まる△は、虹彩候補点について演算された明度差である
Hereinafter, this process is performed for X from 1 to M and y from 1 to N over the entire window. Δ determined by such processing is the brightness difference calculated for the iris candidate points.

以上の処理により第4図のステップ5800の処理が終
わり、候補点群の領域が幾つか得られるので次にラベリ
ング処理を行う(ステップ5801)。この結果例えば
第18図のように暗領域である虹彩候補点に■〜■まで
の番号付けがなされ、それぞれの中心点(Xi、Yi)
が各領域の代表座標点として記憶される。次にステップ
5802により検出領域の上下左右5%ゾーン(第18
図の0.05×吏Wと0.05XfLh)に代表点座標
がある候補点を除外する。そして残りの候補点の面積S
tが所定値SSより大きいものだけを候補点として残す
。これは面積の所定値SSより小さい候補点であれば明
らかに虹彩ではないと判断できるからである(ステップ
5803乃至ステップ5807)。そして最後にステッ
プ5808で下式により候補点の加重平均により虹彩中
心位置を決定する。
Through the above processing, the processing of step 5800 in FIG. 4 is completed, and several regions of candidate point groups are obtained, so labeling processing is performed next (step 5801). As a result, for example, as shown in FIG. 18, the iris candidate points that are dark areas are numbered from ■ to ■, and the center points (Xi, Yi) of each are numbered.
is stored as a representative coordinate point of each area. Next, in step 5802, the upper, lower, left, and right 5% zones (18th
Candidate points whose representative point coordinates are at 0.05×RW and 0.05XfLh in the figure are excluded. And the area S of the remaining candidate points
Only points where t is larger than a predetermined value SS are left as candidate points. This is because if the candidate point has an area smaller than the predetermined value SS, it can be determined that it is clearly not an iris (steps 5803 to 5807). Finally, in step 5808, the iris center position is determined by the weighted average of the candidate points using the following formula.

なお、ステップ5808では加重平均を用いて虹彩中心
位置を決定したが、他に算術平均等を利用してもよい。
Note that in step 5808, the iris center position is determined using a weighted average, but other methods such as an arithmetic average may also be used.

また一般的に虹彩は候補点の中で最大面積の暗領域とな
る場合が多いのでステップ5803乃至ステップ580
8の代りに候補点中で最大面積の候補点の代表点を虹彩
中心位置とすることも可能であり処理の高速化が必要な
る場合等は有効である。
Furthermore, since the iris is generally the dark region with the largest area among the candidate points, steps 5803 to 580
Instead of 8, it is also possible to set the representative point of the candidate point with the largest area among the candidate points as the center position of the iris, which is effective when speeding up the processing is required.

このようにして虹彩中心位置が求められた後最後に第2
図の居眠り、わき見判定回路15において乗員の居眠り
、わき見等の状態を判定する。即ち第3図のステップS
10に移行して判定が行われる。即ち最終出力としての
虹彩候補点の所定値Δは開眼時と閉眼時とで比較すると
大きく異なるため、これを所定のしきい値処理すること
によって開眼か閉眼かを判別することができる。すなわ
ち、ステップS9で算出されたウィンドウ内での明度差
△をしきい値処理し、明度差Δ≧Th 1きい値)の時
は開眼、明度差△SThの時は閉眼であると判断する。
After the iris center position is determined in this way, the second
The drowsiness and inattentiveness determination circuit 15 in the figure determines whether the occupant is dozing off or looking inattentive. That is, step S in FIG.
The process moves to step 10 and a determination is made. That is, since the predetermined value Δ of the iris candidate point as the final output differs greatly when the eyes are open and when the eyes are closed, it can be determined whether the eyes are open or closed by processing this with a predetermined threshold value. That is, the brightness difference Δ within the window calculated in step S9 is subjected to threshold processing, and it is determined that the eyes are open when the brightness difference Δ≧Th 1 threshold), and the eyes are closed when the brightness difference ΔSTh.

まばたきをした場合にも上記の虹彩検出処理で閉眼と判
断されることがあるから、1回の虹彩検出処理で運転者
が居眠りをしていると判断すると誤警報の可能性が高い
ため、同一の虹彩検出処理を複数回繰返し実行し、ある
所定回数以上連続して閉眼が認識されたときに居眠りし
ていると判定する。
Even if the driver blinks, the above iris detection process may determine that the driver's eyes are closed, so if a single iris detection process determines that the driver is dozing off, there is a high possibility of a false alarm. The iris detection process is repeated a plurality of times, and it is determined that the user is dozing when the eyes are continuously closed a predetermined number of times or more.

例えば、第18図に示すように、黒点で示す時間間隔ご
とに画像か入力され、そして虹彩検出処理の結果、閉眼
と判断される回数が3回連続したときは運転者が居眠り
していると判定し、第2図に示すように居眠り判定信号
を出力する。警報出力回路17か居眠り判定信号を受け
ると、警報を発して運転者に注意を促す。
For example, as shown in Figure 18, images are input at time intervals indicated by black dots, and as a result of iris detection processing, if the number of times it is determined that the eyes are closed is three consecutive times, it is determined that the driver is dozing. A dozing determination signal is output as shown in FIG. When the alarm output circuit 17 receives the drowsiness determination signal, an alarm is issued to call the driver's attention.

また、片目のみが開眼と判断した場合は、実際には閉眼
でなく、わき見をしているために原画面から片[1が外
れているものと考えられる。従って居眠りt11断の場
合と同様に3回連続して片目が閉眼していると判断され
たときには、わき見と判定する。
Furthermore, if it is determined that only one eye is open, it is considered that the eye is not actually closed, but that one eye [1] is off from the original screen because the user is looking aside. Therefore, when it is determined that one eye is closed three times in a row, as in the case of falling asleep at t11, it is determined that the user is looking aside.

なお、第5図のWINSUBのサブルーチンにおいて、
検出不能エラーとしてEXITする場合があるが、この
場合も例えば3回連続してEXITになるときは、運転
者が下を向いたために頭のみが画像入力した結果と考え
られるので、このような場合は居眠りしていると判定し
て警報を発することもできる。
In addition, in the WINSUB subroutine in Fig. 5,
EXIT may occur as an undetectable error, but in this case, for example, if EXIT occurs three times in a row, it is thought that the driver looked down and only the head was imaged, so in such cases It can also determine that the person is falling asleep and issue an alarm.

〔発明の効果〕〔Effect of the invention〕

以上より明らかなようにこの発明の構成によれば、虹彩
部を検出する領域に得られる虹彩候補点を統計的手法を
利用した処理を行うことにより運転者の虹彩中心位置を
特定するから眼が開いているか閉じているか、運転者が
正面を向いているか等正確に判断することが可能となっ
た。
As is clear from the above, according to the configuration of the present invention, the center position of the driver's iris is specified by processing the iris candidate points obtained in the iris detection area using a statistical method. It is now possible to accurately determine whether the door is open or closed, whether the driver is facing forward, etc.

【図面の簡単な説明】[Brief explanation of drawings]

第1図はこの発明の構成図、第2図はこの発明の一実胤
例に係る構成図、第3図、第4図は第2図の構成図に基
づくフローチャート、第5図は5ETWIN処理のフロ
ーチャート、第6図はWINSUB処理のフローチャー
ト、第7図乃至第11図はこの実施例の処理に関する説
明図、第12図は眼鏡フレームの判断処理のフローチャ
ート、第13図、第14図はその処理に関する説明図、
第15図は虹彩検出処理の原理説明図、第16図は虹彩
検出処理のフローチャート、第17図は居眠り判断のた
めの説明図、第18図はこの発明実施例の特徴的な処理
の説明図である。 CLI・・・画像入力手段 CL2・・・2値化手段 CL3・・・領域設定手段 CL4・・・虹彩中心検出手段 CL5・・・判定手段
Fig. 1 is a block diagram of this invention, Fig. 2 is a block diagram of an example of this invention, Figs. 3 and 4 are flowcharts based on the block diagram of Fig. 2, and Fig. 5 is a 5ETWIN process. 6 is a flowchart of WINSUB processing, FIGS. 7 to 11 are explanatory diagrams regarding the processing of this embodiment, FIG. 12 is a flowchart of eyeglass frame determination processing, and FIGS. 13 and 14 are flowcharts of the process. Explanatory diagram regarding processing,
Fig. 15 is an explanatory diagram of the principle of iris detection processing, Fig. 16 is a flowchart of iris detection processing, Fig. 17 is an explanatory diagram for determining dozing off, and Fig. 18 is an explanatory diagram of characteristic processing of the embodiment of this invention. It is. CLI... Image input means CL2... Binarization means CL3... Area setting means CL4... Iris center detection means CL5... Judgment means

Claims (1)

【特許請求の範囲】[Claims] 運転者の両目を含む顔画像を入力する画像入力手段と、
この画像入力手段から送出される入力画像を2値化する
2値化手段と、この2値化手段による2値化画像におい
て運転者の虹彩部を検出する領域を設定する領域設定手
段と、この領域設定手段で設定した領域内において明暗
域部分の面積を統計的手法で処理し運転者の虹彩中心位
置を検出する虹彩中心検出手段と、この虹彩中心検出手
段による検出結果から運転者の状態を判定する判定手段
とを備えたことを特徴とする運転者の状態検出装置。
an image input means for inputting a facial image including both eyes of the driver;
Binarization means for binarizing the input image sent from the image input means; area setting means for setting an area for detecting the driver's iris in the binarized image by the binarization means; An iris center detection means for detecting the center position of the driver's iris by statistically processing the area of bright and dark areas within the area set by the area setting means, and detecting the driver's condition from the detection result of the iris center detection means. What is claimed is: 1. A driver condition detection device, comprising: determination means for making a determination.
JP1338671A 1989-12-28 1989-12-28 Iris position detecting device and driver state detecting device Expired - Fee Related JP2932551B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1338671A JP2932551B2 (en) 1989-12-28 1989-12-28 Iris position detecting device and driver state detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1338671A JP2932551B2 (en) 1989-12-28 1989-12-28 Iris position detecting device and driver state detecting device

Publications (2)

Publication Number Publication Date
JPH03202045A true JPH03202045A (en) 1991-09-03
JP2932551B2 JP2932551B2 (en) 1999-08-09

Family

ID=18320367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1338671A Expired - Fee Related JP2932551B2 (en) 1989-12-28 1989-12-28 Iris position detecting device and driver state detecting device

Country Status (1)

Country Link
JP (1) JP2932551B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007055912A1 (en) 2006-12-26 2008-07-03 Aisin Seiki K.K., Kariya Eyelid detection device, eyelid detection method and associated program
US7916904B2 (en) 2007-03-19 2011-03-29 Aisin Seiki Kabushiki Kaisha Face region detecting device, method, and computer readable recording medium
US7936926B2 (en) 2007-03-13 2011-05-03 Aisin Seiki Kabushiki Kaisha Apparatus, method, and program for face feature point detection
US8224035B2 (en) 2006-12-06 2012-07-17 Aisin Seiki Kabushiki Kaisha Device, method and program for detecting eye
US8498449B2 (en) 2006-12-04 2013-07-30 Aisin Seiki Kabushiki Kaisha Eye detecting device, eye detecting method, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4397531A (en) * 1981-06-29 1983-08-09 Honeywell Inc. Eye closure discrimination system
JPS60158303A (en) * 1984-01-30 1985-08-19 Nippon Denso Co Ltd Apparatus for recognizing positions of vehicle driver's eyes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4397531A (en) * 1981-06-29 1983-08-09 Honeywell Inc. Eye closure discrimination system
JPS60158303A (en) * 1984-01-30 1985-08-19 Nippon Denso Co Ltd Apparatus for recognizing positions of vehicle driver's eyes

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8498449B2 (en) 2006-12-04 2013-07-30 Aisin Seiki Kabushiki Kaisha Eye detecting device, eye detecting method, and program
US8224035B2 (en) 2006-12-06 2012-07-17 Aisin Seiki Kabushiki Kaisha Device, method and program for detecting eye
DE102007055912A1 (en) 2006-12-26 2008-07-03 Aisin Seiki K.K., Kariya Eyelid detection device, eyelid detection method and associated program
US7936926B2 (en) 2007-03-13 2011-05-03 Aisin Seiki Kabushiki Kaisha Apparatus, method, and program for face feature point detection
US7916904B2 (en) 2007-03-19 2011-03-29 Aisin Seiki Kabushiki Kaisha Face region detecting device, method, and computer readable recording medium

Also Published As

Publication number Publication date
JP2932551B2 (en) 1999-08-09

Similar Documents

Publication Publication Date Title
JP2541688B2 (en) Eye position detection device
JP2522859B2 (en) Eye position detection device
JP4307496B2 (en) Facial part detection device and program
US5859686A (en) Eye finding and tracking system
US6304187B1 (en) Method and device for detecting drowsiness and preventing a driver of a motor vehicle from falling asleep
JP3143819B2 (en) Eyelid opening detector
US7907752B2 (en) Face center position detecting device, face center position detecting method, and computer-readable medium
EP1868138A2 (en) Method of tracking a human eye in a video image
JPH0944685A (en) Face image processor
KR20210142177A (en) Methods and devices for detecting children's conditions, electronic devices, memory
EP2060993B1 (en) An awareness detection system and method
JP2822799B2 (en) Driver status detection device
JP3395344B2 (en) Image processing device and doze alarm device using the same
US20050163383A1 (en) Driver's eye image detecting device and method in drowsy driver warning system
JP2836238B2 (en) Driving car eye position detection device and state detection device
JPH03202045A (en) Detecting device for state of driver
JP2705388B2 (en) Driver's eye position detection device
JP2936943B2 (en) Driver status detection device
JP3444115B2 (en) Dozing state detection device
JP2677010B2 (en) Eye position detection device
JPH03194661A (en) Device for detecting driver's state
JP2802635B2 (en) Energization control device for electrical equipment
JP2541689B2 (en) Eye position detection device and subject state detection device
JPH04216403A (en) Detecting apparatus of position of eye
JPH04225478A (en) Ones eyes detecting device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees