JPH02183811A - Energization controller for electrical equipment - Google Patents

Energization controller for electrical equipment

Info

Publication number
JPH02183811A
JPH02183811A JP1004481A JP448189A JPH02183811A JP H02183811 A JPH02183811 A JP H02183811A JP 1004481 A JP1004481 A JP 1004481A JP 448189 A JP448189 A JP 448189A JP H02183811 A JPH02183811 A JP H02183811A
Authority
JP
Japan
Prior art keywords
target
window
value
register
tracking
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
JP1004481A
Other languages
Japanese (ja)
Other versions
JP2802635B2 (en
Inventor
Mitsuhiro Ando
充宏 安藤
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.)
Shinsangyo Kaihatsu KK
Aisin Corp
Original Assignee
Aisin Seiki Co Ltd
Shinsangyo Kaihatsu KK
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, Shinsangyo Kaihatsu KK filed Critical Aisin Seiki Co Ltd
Priority to JP1004481A priority Critical patent/JP2802635B2/en
Publication of JPH02183811A publication Critical patent/JPH02183811A/en
Application granted granted Critical
Publication of JP2802635B2 publication Critical patent/JP2802635B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Geophysics And Detection Of Objects (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Emergency Alarm Devices (AREA)

Abstract

PURPOSE:To shorten the tracking time of a target and to attain the scan in real time by integrating the shift data on the target by the prescribed frequency and at each fixed time in a tracking scan process of the target and calculating the mean value and the scattering value of the data equivalent to the prescribed frequency to set a medium area window. CONSTITUTION:The shift data on a target are integrated at each prescribed time to calculate the mean value and the scattering value of the data equivalent to the prescribed frequency in a process where the target is tracked by a target tracking means I applying a narrow band window. When the calculation is through, a decision flag PFLAG of a medium area window setting possibility deciding means M is set at 1. A medium area window setting means N sets a medium area window having a high target catching probability assured statistically based on the mean value and the scattering value which are calculated and stored by a mean value/scattering value calculation means L. Then a target detecting means P detects the target by means of the medium area window. Thus the overall target tracking speed is improved for an electrical equipment.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、電気装置にオン・オフ等の付勢制御信号を与
える付勢制御装置に関し、更に詳述すれば、物、例えば
人の目または口の動きに非接触で応答して、所要の電気
装置に付勢信号を与又る、物の動作を自動検出して電気
装置を制御する装置に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to an energization control device that provides an energization control signal such as on/off to an electrical device. Alternatively, the present invention relates to a device that automatically detects the movement of an object and controls an electrical device by applying an energizing signal to a required electrical device in response to mouth movements without contact.

[従来の技術] この種の電気装置の付勢制御装置は、CCD(電荷結合
デバイス)の進歩により、高速移動物の監視制御装置と
して、印刷写真、製紙、エレクトロエックス、機械加工
、繊維、電線、薬品、食品などの業界で実用化が進んで
いる。しかしながら、その利用範囲は、選択された最良
の採光条件のもとで、特定の目標対象物の特定の運動の
検出に限定され、変動する採光条件下で複雑な変化をす
る微小な目標物(例えば自動車のドライバの瞳または口
の動き)を追跡して、所定の電気装置を制御する技術は
開発されていなかった。
[Prior Art] With the advancement of CCD (charge-coupled device), this type of energization control device for electrical equipment has been used as a monitoring and control device for high-speed moving objects in printing photographs, paper manufacturing, electro-X, machining, textiles, and electric wires. Practical applications are progressing in the pharmaceutical, food, and other industries. However, its scope of use is limited to the detection of specific movements of specific target objects under the selected best lighting conditions, and is limited to the detection of minute objects that undergo complex changes under varying lighting conditions ( No technology has been developed to track the movements of a car driver's eyes or mouth, for example, to control certain electrical devices.

本発明者は、この問題を解決するため、種々研究を重ね
、物の狭い領域(例えば瞳または口)の移動または変化
に応答して、各種電気装置を制御する電気装置の付勢制
御装置を発明出願した。
In order to solve this problem, the present inventor has conducted various studies and developed an energization control device for electrical devices that controls various electrical devices in response to movement or changes in a narrow area of an object (e.g., eyes or mouth). I applied for an invention.

(時開 昭62−247410号) 出願にかかる電気装置の付勢制御装置は、像の光情報を
デジタル画像情報に変換入力する画像入力手段および前
記像の特定目標部分の位置を検出する目標物検出手段を
用い、物または人(以下例示として車上のドライバを挙
げる)を撮影して撮影画像の一部例えばドライバの瞳お
よび口などの特定目標部分の位置を検出する。
(Jikai No. 62-247410) The energization control device for an electric device according to the application includes an image input means for converting and inputting optical information of an image into digital image information, and a target object for detecting the position of a specific target portion of the image. The detection means is used to photograph an object or a person (hereinafter, a driver on a car will be cited as an example) and detect the position of a specific target part such as a portion of the photographed image, such as the driver's eyes and mouth.

車内の明るさは変動するので照明手段の明るさを一定に
し、明るさの変動による画像処理エラーを防止する照明
手段を備えている。
Since the brightness inside the vehicle fluctuates, the vehicle is equipped with a lighting device that keeps the brightness of the lighting device constant and prevents image processing errors due to fluctuations in brightness.

また車体の振動やドライバの無意識の微動作または姿勢
変化による顔の位置変化に追従し、かつ電気装置を制御
するための意図的な口または瞳の位置変化にも追従して
、正確に瞳および口を撮影情報から摘出するために、検
出した位置を記憶する記憶手段、記憶した位置に基づい
て前記撮像手段の撮像画面より狭い領域を設定するウィ
ンドウ設定手段、および前記狭い領域の前記特定目標部
分の位置を記憶手段に更新記憶する記憶手段とを備えて
いる。これにより、−度瞳または口の位置を検出した後
は、画面において瞳および口を検出するための情報走査
が狭領域に限定され、瞳および口を検出する時間が短く
なり、瞳および口を迅速かつ正確に追跡出来る。
It also tracks changes in the position of the face due to vibrations of the vehicle body, unconscious minute movements of the driver, or changes in posture, as well as intentional changes in the position of the mouth or eyes to control electrical devices, accurately adjusting the position of the eyes and eyes. In order to extract the mouth from photographic information, a storage means for storing a detected position, a window setting means for setting an area narrower than the imaging screen of the imaging means based on the stored position, and the specific target portion of the narrow area. and storage means for updating and storing the position of. As a result, after the position of the pupils or mouth is detected, the information scanning for detecting the pupils and mouth on the screen is limited to a narrow area, the time to detect the pupils and mouth is shortened, and the position of the pupils and mouth is detected. Can be tracked quickly and accurately.

上記電気装置の付勢制御装置では更に、瞳および口の時
系列状態変化を検出する目標物追跡手段、目標物の状態
変化に対応した制御信号を対象電気装置に与える制御信
号判別手段を備え、追跡している瞳または口に、電気装
置制御のための意図的な変化が現われると、該変化に対
応付けた制御信号を電気装置に与えるように構成したも
のである。
The energization control device for an electric device further includes a target object tracking means for detecting time-series state changes of the pupils and mouth, and a control signal discriminating means for supplying a control signal corresponding to the state change of the target object to the target electric device, When an intentional change for controlling the electrical device appears in the eye or mouth being tracked, a control signal corresponding to the change is given to the electrical device.

以上のように、時開 昭62−247410号の電気装
置の付勢制御装置では、ドライバは運転姿勢のままで、
目を動かしまたは口を動かすことにより電気装置を制御
することができ、快適かつ安全な運転を可能とする0例
えば発声して何かを指示すると、この口形状に応じて電
気装置が制御され、発声しなくても発声のときと同じ口
形状を意図的に行うと、この口形状に応じて電気装置が
制御され、音声に依存しないので車内の騒音による検出
エラーを排除することができる。
As described above, in the energization control device for electrical equipment disclosed in Jikai No. 62-247410, the driver remains in the driving position.
Electrical devices can be controlled by moving the eyes or mouth, allowing for comfortable and safe driving.For example, when you give a command by speaking, the electrical device is controlled according to the shape of your mouth. Even if you are not making a sound, if you intentionally make the same mouth shape as when you are making a sound, the electrical device will be controlled according to this mouth shape, and since it does not depend on the sound, it is possible to eliminate detection errors caused by noise inside the car.

しかしながら上記装置は、撮像対象(例えば車両のドラ
イバの顔)の明るさが顔各部で比較的に均一であるとき
、代表的には、夜間に対向車がなく、顔を照らす車内照
明灯のみが実質的に撮像用の照明であるときに、ドライ
バの頭および顔ならびに瞳の検出精度が高く、前記した
効果が得られる。しかし、夜間に対向車や後続車の強い
ヘッドライトをドライバが顔や頭に浴びたとき、あるい
は昼間の陽光が強いときには、照明灯によるよりも強い
外光がドライバの顔や頭で反射しあるいは遮られること
がある。このとき、顔の一部分のみの反射光強度が強く
、他の部分は陰になって暗い、という不均一な顔照明と
なることが多い1例えば右手に太陽があるとき・の晴天
下の走行では、右目周りが極めて明るく左目周りが極く
暗くなる。このような不均一照明のときには、上記装置
では、撮像画像全面を1つのしきい値で2値化するので
、ドライバの瞳の検出精度が低下し、ドライバの口形状
検出精度も低下するという問題点があった。
However, when the brightness of the object to be imaged (for example, the face of a vehicle driver) is relatively uniform across different parts of the face, typically there is no oncoming vehicle at night and only the interior lights illuminating the face are used. When the illumination is substantially for imaging, the detection accuracy of the driver's head, face, and eyes is high, and the above-mentioned effects can be obtained. However, when a driver's face and head are exposed to the strong headlights of an oncoming or following vehicle at night, or when the sunlight is strong during the day, the driver's face and head reflect stronger external light than the headlights. It may be blocked. At this time, the intensity of reflected light in only one part of the face is strong, while other parts are in shadow and dark, which often results in uneven face illumination.1 For example, when driving under clear skies when the sun is on your right. , the area around the right eye becomes extremely bright and the area around the left eye becomes extremely dark. In the case of such non-uniform illumination, the device described above binarizes the entire captured image using one threshold value, so there is a problem that the accuracy of detecting the driver's pupils and the shape of the driver's mouth also decreases. There was a point.

上記問題点を解決するため、本発明者は、更に研究を重
ね、撮影画像内の所定部分(例えば顔)内の、隣接複数
領域(例えば右半分と左半分)のそれぞれにつき、第1
階調ヒストグラムを演算し、これに基づいて各領域のし
きい値を定めて画像階調情報を2値化して、撮像物(例
えば顔)の中の、前記隣接複数領域に及ぶ濃度階調が2
値的に切換わる境界(例えば頭髪と額の境界)を検出し
、検出した境界を基準とした狭い領域(例えば目を含む
領域)の画像階調情報の第2階調ヒストグラムを演算し
、これに基づいてしきい値を定めて、該狭い領域の画像
階調情報を2値化し、該狭い領域内の特定小部分(例え
ば瞳)の位置を検出する検出手段を付加した、電気装置
の付勢制御装置を発明し出願した。
In order to solve the above-mentioned problems, the present inventor conducted further research and determined that the first
A gradation histogram is calculated, a threshold value is determined for each area based on this, and the image gradation information is binarized, so that the density gradation of the plurality of adjacent areas in the imaged object (for example, a face) is determined. 2
A boundary that changes in value (for example, the boundary between hair and forehead) is detected, a second tone histogram of image tone information of a narrow area (for example, an area including the eyes) based on the detected boundary is calculated, and this is An electric device is equipped with a detection means that determines a threshold value based on the above, binarizes the image gradation information of the narrow area, and detects the position of a specific small part (for example, a pupil) within the narrow area. He invented and applied for a power control device.

(特願 昭62−169325号) 階調ヒストグラムに基づくしきい値の設定と、該しきい
値に基づいた2値化処理は、画面の濃度が変動する場合
に、画面の中の背景(例えばバックシート)から、該背
景の前にある物(例えば頭部)を切出すのに適しており
、また非対象照明と照明自身の明るさ変動があっても、
所要領域内で階調が急激に変化している部分(例えば瞳
)を背景(例えば瞳周り)から、高精度で切出し分離す
ることが可能である。
(Patent Application No. 169325/1982) Setting a threshold value based on a gradation histogram and binarization processing based on the threshold value are useful when the background in the screen (e.g. It is suitable for cutting out objects in front of the background (for example, the head) from the back sheet), and even if there is non-target illumination and brightness fluctuations of the illumination itself,
It is possible to cut out and separate a portion (for example, the pupil) where the gradation changes rapidly within a required region from the background (for example, around the pupil) with high precision.

従って、この特願 昭62−169325号によれば、
物が非対象に照明されたり、また照明自身に大きな明る
さの変動があっても、特定部分の検出を高精度で行うこ
とが可能である。
Therefore, according to this patent application No. 169325/1982,
Even if an object is asymmetrically illuminated or the illumination itself has large variations in brightness, it is possible to detect a specific part with high precision.

[発明が解決しようとする課M] ところが、上述した時開 昭62−247410号およ
び特願 昭62−169325によると、ドライバが遭
遇する各種の運転状況下において、狭い領域内の目標物
(例えば瞳または口)を時系列を追って追跡検出するこ
とは可能となったが、追跡を実施する狭い領域ウィンド
ウ枠は予め所定の寸法に固定したものであり、前記ウィ
ンドウ枠寸法を小さく設定するときには、検出時間は速
くなるが、追跡中に目標物が枠内から逸脱する可能性が
大きい、また、枠寸法を大きく設定すると、追跡失敗の
可能性は小さくなるが、検出時間は長くなる。また検出
に失敗すると、初期ステップに戻って、画像境界領域の
検出、広域ウィンドウの設定、広域ウィンドウによる目
標物の再検出の過程を経て、目標物を同一寸法の狭域ウ
ィンドウで再追跡することが必要であり、追跡に失敗し
た後、再追跡を可能とするまでに長時間を必要とする問
題点がある。
[Problem M to be solved by the invention] However, according to the above-mentioned Jikai No. 62-247410 and patent application No. 62-169325, under various driving situations encountered by a driver, a target object within a narrow area (e.g. Although it has become possible to track and detect the eyes (pupils or mouth) in time series, the narrow area window frame for tracking is fixed to a predetermined size in advance, and when the window frame size is set small, Although the detection time becomes faster, there is a greater possibility that the target object will deviate from the frame during tracking.Also, if the frame size is set large, the possibility of tracking failure becomes smaller, but the detection time becomes longer. If detection fails, the process returns to the initial step, detects the image boundary area, sets a wide window, redetects the target using the wide window, and then re-tracks the target using a narrow window of the same size. However, there is a problem in that it takes a long time to enable re-tracking after tracking has failed.

すなわち、第9a図に示す従来技術の構成においては、
広域ウィンドウによる目標物検出手段Gおよび狭域ウィ
ンドウによる目標物追跡手段Iにおいて、目標物の検出
または追跡に失敗すると、画像境界検出手段Eにもどり
、広域ウィンドウ設定手段F、広域ウィンドウにおける
目標物検出手段G、狭域ウィンドウ設定手段Hを経て、
目標物追跡手段Iで再追跡するため、目標物を発見、再
追跡を可能とするまでに複雑なステップを経由し、長時
間を必要とする。
That is, in the prior art configuration shown in FIG. 9a,
If the target object detection means G using a wide area window and the target object tracking means I using a narrow area window fail to detect or track the target, the process returns to the image boundary detection means E, and the wide area window setting means F then detects the target in the wide area window. Through means G and narrow window setting means H,
In order to re-track the target object with the target object tracking means I, complicated steps are required to discover the target object and make re-tracking possible, and a long time is required.

[課題を解決するための手段] 本発明者は、上記課題を、目標物追跡手段で目標物を追
跡走査する過程で、所定時間毎に測定する目標物の移動
データを所定回数集積し、該所定回数分のデータの平均
値および分散値を算出し、さらに該平均値および分散値
を、新データ入力の都度逐次変更記憶する目標物の移動
の平均値および分散値算出手段りと、 該平均値および分散値の初期値が決定すると、中域ウィ
ンドウの設定が可能であることを指示する中域ウィンド
ウ設定可能判定手段Mと、該平均値及び分散値を用いて
中域ウィンドウを設定する中域ウィンドウ設定手段Nと
、該設定された中域ウィンドウ内で目標物を検出する中
域ウィンドウによる目標物検出手段Pとを設けることに
より解決した。
[Means for Solving the Problem] The present inventor solved the above problem by accumulating movement data of a target object measured at predetermined time intervals a predetermined number of times in the process of tracking and scanning a target object with a target object tracking means. means for calculating the average value and variance of data for a predetermined number of times, and further changing and storing the average and variance values sequentially each time new data is input; When the initial values of the average value and the variance value are determined, a midrange window setting possibility determining means M for instructing that the midrange window can be set; This problem was solved by providing a region window setting means N and a target object detection means P using a mid-range window for detecting a target within the set mid-range window.

[作 用] 第9b図に示す本発明の構成図において、狭域ウィンド
ウによる目標物追跡手段Iによって目標物を追跡する過
程で、所定時間毎に目標物の移動データを所定回数集積
し、該所定回数分のデータの平均値および分散値を算出
し、算出を終えると、中域ウィンドウ設定可能判定手段
Mの判定フラッグDFLAGを1にセットする。
[Operation] In the configuration diagram of the present invention shown in FIG. 9b, in the process of tracking a target by the narrow window target tracking means I, movement data of the target is accumulated a predetermined number of times at predetermined time intervals, and The average value and the variance value of the data for a predetermined number of times are calculated, and when the calculation is completed, the determination flag DFLAG of the mid-range window setting possibility determining means M is set to 1.

中域ウィンドウ設定手段Nは、平均値および分散値算出
手段して算出記憶されている平均値および分散値を用い
、統計的に保証された目標物捕捉確率の高い中域ウィン
ドウを設定し、この中域ウィンドウを使用して、目標物
検出手段Pにより、目標物を検出する。
The medium range window setting means N uses the average value and variance value calculated and stored by the mean value and variance value calculation means to set a medium range window with a high statistically guaranteed probability of capturing the target. A target object is detected by the target object detection means P using the mid-range window.

狭域ウィンドウによる目標物追跡手段■で目標物を追跡
中に目標物の追跡に失敗すると、中域ウィンドウ設定可
能判定手段Mへ戻り、DFLAGが1にセットされてお
れば、中域ウィンドウの設定が可能と判断し、中域ウィ
ンドウ判定手段Nおよび中域ウィンドウによる目標物検
出手段Pを経て、目標物を速やかに再検出し、狭域ウィ
ンドウによる目標物追跡手段Iで、目標物の追跡を再開
する。
If tracking of the target fails while tracking the target using the narrow window target tracking means (■), the process returns to the medium range window setting possibility determining means M, and if DFLAG is set to 1, the medium range window is set. is determined to be possible, the target is promptly re-detected through the medium-range window determination means N and the target object detection means P using the medium-range window, and the target object tracking means I using the narrow-range window is used to track the target. resume.

従って、この装置の起動時の初期状態で、中域ウィンド
ウ設定可能判定手段MでDFLAGが0にセットされて
いる間は、目標物の追跡に失敗すると、画像境界検出手
段E、広域ウィンドウ設定手段F、広域ウィンドウによ
る目標物検出手段G、狭域ウィンドウ設定手段Hな経て
、目標物の再追跡を必要とするが、所定時間が経過して
、DFLAGが1にセットされた以降は、中域ウィンド
ウ設定手段N、中域ウィンドウによる目標物検出手段P
を備えるバイパス回路により、迅速な目標物の再追跡を
可能とする。
Therefore, in the initial state at the time of startup of this device, while DFLAG is set to 0 by the medium area window setting possibility determining means M, if tracking of the target fails, the image boundary detecting means E, the wide area window setting means Although it is necessary to re-track the target after F. target detection means G using a wide area window and narrow window setting means H, after a predetermined time has elapsed and DFLAG is set to 1, the medium area Window setting means N, target detection means P using a medium range window
By-pass circuit equipped with 100mm enables quick re-tracking of the target.

[実施例] 第1a図に本発明の一実施例の構成ブロックダイヤグラ
ムを示す、この実施例は車上搭載電気装置を、ドライバ
の顔の瞳および口の意図的な動きに応答してオン/オフ
およびアップ/ダウン等の制御を行う車上制御装置であ
る。
Embodiment FIG. 1a shows a block diagram of an embodiment of the present invention, which turns on-vehicle electrical devices on and off in response to intentional movements of the eyes and mouth of the driver's face. This is an on-vehicle control device that performs off, up/down, etc. control.

画像入力手段Aはテレビカメラ3とA/Dコンバータ1
8とインターフェイス15.17とから構成され、テレ
ビカメラ3は、1フレーム256×256画素の撮像信
号(アナログビデオ信号)を得る2次元COD (電荷
結合デバイス)を備えている。このテレビカメラ3に、
インターフェイス17を介して、マイクロプロセッサ6
がオン/オフの信号を与える。テレビカメラ3は、1フ
シーム256X256画素の明るさ信号を繰返してA/
Dコンバータ18に出力するとともに、画素同期パルス
をA/Dコンバータ18にA/D変換同期パルスとして
与え、フレーム同期パルス、ライン同期パルスおよび画
素同期パルスをインターフェイス15を介してマイクロ
プロセッサ6に与える。A/Dコンバータ18は、この
例では、ビデオ信号を8ビツト(256階調)のデジタ
ルデータに変換する。
Image input means A includes a television camera 3 and an A/D converter 1
The television camera 3 includes a two-dimensional COD (charge-coupled device) that obtains an image signal (analog video signal) of 256×256 pixels per frame. To this TV camera 3,
Microprocessor 6 via interface 17
gives an on/off signal. The television camera 3 repeats the brightness signal of 256 x 256 pixels per frame and performs A/
It outputs to the D converter 18, provides a pixel synchronization pulse to the A/D converter 18 as an A/D conversion synchronization pulse, and provides a frame synchronization pulse, a line synchronization pulse, and a pixel synchronization pulse to the microprocessor 6 via the interface 15. In this example, the A/D converter 18 converts the video signal into 8-bit (256 gradation) digital data.

照明手段Bは照明灯4と照明コントローラ19とで構成
されており、照明灯4は発光源としてフィラメントを用
いる白熱電球であり、照明コントローラ19は直流電圧
をサイリスタチョッパでチョッピングして照明灯4に印
加する。照明コントローラ19は、制御信号がオフを示
すものである消灯のときは、サイリスタチョッパをオフ
にして、制御信号がオンの点灯のときには、まず標準の
デユーティでサイリスタチョッパをオン/オフ制御し、
アップ(明るさ上げ)を指示する信号が到来すると1ス
テツプだけデユーティを高く更新げ)を指示する信号が
到来すると1ステツプだけデユーティを低く更新設定し
、アップおよびダウンが限度になると、それぞれアップ
およびダウンをそこで停止する。照明コントローラ19
には、マイクロプロセッサ6が、インターフェイス14
を介して、前述のオン/オフ、アップ/ダウンの制御信
号を与える。
The lighting means B is composed of a lighting lamp 4 and a lighting controller 19. The lighting lamp 4 is an incandescent light bulb that uses a filament as a light emitting source, and the lighting controller 19 chops DC voltage with a thyristor chopper and supplies the lighting lamp 4 with a thyristor chopper. Apply. The lighting controller 19 turns off the thyristor chopper when the control signal is off, which indicates off, and when the control signal is on, which indicates on, the lighting controller 19 first controls the thyristor chopper on/off at a standard duty.
When a signal instructing brightness up (brightness increase) arrives, the duty is updated one step higher.When a signal instructing the brightness up and down is reached, the duty is updated lower by one step. Stop down there. lighting controller 19
The microprocessor 6 is connected to the interface 14.
The above-mentioned on/off and up/down control signals are provided through the .

画像入力手段Aのテレビカメラ3と、ドライバの少なく
とも顔部を照明する照明手段Bを構成する照明灯4は、
第1b図に示すように一体に構成されてインスツルメン
トパネル2に、上下および左右に指向方向を調整自在、
に固定されている。
The television camera 3 of the image input means A and the illumination lamp 4 constituting the illumination means B that illuminates at least the driver's face are:
As shown in FIG. 1b, it is integrated into the instrument panel 2, and the pointing direction can be adjusted vertically and horizontally.
Fixed.

マイクロプロセッサ6には、モードスイッチ5Eおよび
5Mが接続されて、目標物選択手段Cを構成している。
Mode switches 5E and 5M are connected to the microprocessor 6 to constitute target selection means C.

スイッチ5Eは瞳応答モードを指定するためのものであ
り、このスイッチ5Eが閉(Ilfi応答モードを指示
)のときに、マイクロプロセッサ6は、瞳の位置および
まばたきパターンに対応して、電気装置を制御する。
The switch 5E is for specifying the pupil response mode, and when the switch 5E is closed (instructing the Ilfi response mode), the microprocessor 6 turns on the electrical device in accordance with the pupil position and blink pattern. Control.

スイッチ5Mは、口応答モードを指定するものであり、
このスイッチ5Mが閉(口応答モードを指示)のときに
、マイクロプロセッサ6は、口の形状パターンに応答し
て電気装置を制御する。
Switch 5M specifies oral response mode,
When this switch 5M is closed (indicating mouth response mode), the microprocessor 6 controls the electrical device in response to the mouth shape pattern.

画像制御記憶手段りのマイクロプロセッサ6は、撮像デ
ータ(画像データ)の1フレ一ム分を読込むときには、
フレーム同期パルスに同期して、フレームメモリ(RA
M)13に書込みを指示し、ライン同期パルス及び画素
同期パルスに同期してフレームメモリ13の書込みアド
レスを進める。
When the microprocessor 6 of the image control storage means reads one frame of imaging data (image data),
The frame memory (RA) is synchronized with the frame synchronization pulse.
M) 13 to write, and advance the write address of the frame memory 13 in synchronization with the line synchronization pulse and the pixel synchronization pulse.

マイクロプロセッサ6には、画像データの演算を行うも
う一つの画像演算用マイクロプロセッサ8が接続されて
おり、1フレ一ム分の2値化データ(1画素当たり1ビ
ツトの画像点の有無を示すデータ)を−時記憶するため
のフレームメモリ(RAM)11.プロセッサ制御用の
ROM9およびRAMl0、バスコントローラ16およ
び前述のフレームメモリ13が接続され、更に制御対象
の電気装置20〜30および照明コントローラ19が接
季売されている。
The microprocessor 6 is connected to another image calculation microprocessor 8 that performs image data calculations, and stores one frame's worth of binarized data (one bit per pixel indicating the presence or absence of an image point). Frame memory (RAM) for storing data) 11. A ROM 9 and a RAM 10 for processor control, a bus controller 16, and the above-mentioned frame memory 13 are connected, and electrical devices 20 to 30 to be controlled and a lighting controller 19 are also sold separately.

画像演算用マイクロプロセッサ8は、入出力コントロー
ル用マイクロプロセッサ6の制御指令に従い、ROM9
に内蔵されたプログラムにより、フレームメモリ11.
13に記憶された画像情報を内蔵する 中域ウィンドウ設定可能判定手段    M画像境界検
出手段           E広域ウィンドウ設定手
段        F目標物検出手段        
    G狭域ウィンドウ設定手段        H
狭域ウィンドウによる目標物追跡手段  ■目標物の移
動の平均値、分散値算出手段 L制御信号判別手段  
         J中域ウィンドウ設定手段    
    N中域ウィンドウによる目標物検出手段  P
の各手段により、下記の演算処理を実施する。
The image calculation microprocessor 8 reads the ROM 9 according to the control instructions from the input/output control microprocessor 6.
The program built into the frame memory 11.
M image boundary detection means E wide area window setting means F target object detection means
G Narrow window setting means H
Means for tracking the target using a narrow window ■ Means for calculating the average value and variance of the movement of the target L control signal discriminating means
J mid range window setting means
N Target detection means using medium range window P
The following arithmetic processing is performed by each means.

中域ウィンドウ設定可能判定手段Mは、目標物の移動の
平均値、分散値算出手段り内で目標物の動きの平均値と
分散値が計算されると、初期化で0にセットされている
フラッグDFLAGを工とし、DFLAG=Oのときは
、中域ウィンドウの設定を不可能とし、DFLAG= 
1のときは、中域ウィンドウ設定手段Nの作動を可能と
する。
The medium range window setting possibility determination means M is set to 0 at initialization when the average value and variance value of the movement of the target object are calculated in the average value and variance value calculation means of the movement of the target object. Using the flag DFLAG, when DFLAG=O, it is impossible to set the midrange window, and DFLAG=
When the value is 1, the operation of the midrange window setting means N is enabled.

画像境界検出手段Eは、送り込まれた画像情報を2値化
して、画像の境界を検出する。
The image boundary detection means E binarizes the input image information and detects the boundaries of the image.

広域ウィンドウ設定手段Fは、検出された境界から目標
物を走査検出するための広域ウィンドウを設定する。
The wide area window setting means F sets a wide area window for scanning and detecting a target from the detected boundary.

目標検出手段Gは、前記広域ウィンドウ内を走査して目
標物を検出する。
The target detection means G scans the wide area window to detect a target object.

狭域ウィンドウ設定手段Hは、検出した目標を追跡する
狭域ウィンドウを設定する。
The narrow window setting means H sets a narrow window for tracking the detected target.

中域ウィンドウ設定手段Nは、前記目標物の移動の平均
値、分散値算出手段りで算出された結果を使用して、追
跡に失敗して見失った目標物を検出する中域ウィンドウ
を設定する。
The middle range window setting means N sets a middle range window for detecting a target that has failed in tracking and has been lost, using the average value of the movement of the target object and the results calculated by the variance value calculation means. .

中域ウィンドウによる目標物検出手段Pは、該ウィンド
ウを使用して目標物を検出する。
Target object detection means P using a mid-range window detects a target object using the window.

目標物を追跡する狭域ウィンドウの大きさと、ウィンド
ウをセットする中心位置(検出した目標物の中心)が決
定すると、新たに1フレ一ム分のデジタル画像情報を取
り込み、目標物追跡手段Iにより、目標物を追跡し、追
跡に失敗すると、手段Mに戻る。
Once the size of the narrow window for tracking the target object and the center position for setting the window (the center of the detected target object) are determined, one new frame of digital image information is taken in, and the target tracking means I , tracks the target and returns to means M if tracking fails.

目標物の移動の平均値、分散値算出手段りは、所定時間
毎に追跡した目標物の移動データを所定回数集積し、該
所定回数分のデータの平均値、分析値を算出し、更に該
平均値、分析値を、新データの入力の都度逐次更新記憶
する。また平均値、分析値の初期値を得ると、前記DF
LAGを1にして、中域ウィンドウ設定可能判定手段M
が設定可能の判定を出すようにセットする。
The average value and variance value calculation means for the movement of the target object accumulates the movement data of the target object tracked at predetermined time intervals a predetermined number of times, calculates the average value and analysis value of the data for the predetermined number of times, and further calculates the average value and the analysis value of the data for the predetermined number of times. Average values and analysis values are updated and stored every time new data is input. Moreover, when the initial values of the average value and analysis value are obtained, the DF
Setting LAG to 1, medium range window setting determination means M
Set it so that it determines that it is configurable.

制御信号判定手段Jは、追跡した目標物の運動パターン
と所定のパターンとが一致すると、電気装置制御手段K
に、制御信号を発信する。
When the motion pattern of the tracked target matches a predetermined pattern, the control signal determining means J detects the electric device controlling means K.
The control signal is then transmitted.

以上の画像処理のシーケンスを要約すると、(1)1フ
レ一ム分のデジタル画像情報は、当初はM−E−F−G
−H→I−L→J の各経路を辿り、目標物の追跡に成功している間は、 J−I−L→J→I を繰返し、追跡に失敗すると、 ■→M−E→F→G−H→■→L→J と進んで処理される。
To summarize the above image processing sequence, (1) one frame's worth of digital image information is initially M-E-F-G
-H → I-L → J, and while the target is successfully tracked, J-I-L → J → I is repeated, and when tracking fails, ■ → M-E → F →G-H→■→L→J is processed.

(2)追跡作業を繰返している間に手段して目標物の移
動の平均値、および分析値の算出が可能となった後に追
跡に失敗すると、 ■→M−N→P→I→L→J と進み、追跡に成功している間は、 J→I−L→J→I を繰返す。
(2) If tracking fails after it becomes possible to calculate the average movement value and analysis value of the target while repeating the tracking work, ■→M-N→P→I→L→ Proceed with J, and repeat J→IL→J→I while tracking is successful.

(3)手段Nで設定される中域ウィンドウは、統計的と
目標捕捉確率の高いウィンドウであるので、捕捉に失敗
する確率は非常に少なくなる。
(3) Since the mid-range window set by means N is a window with a statistically high probability of target acquisition, the probability of failure in acquisition is extremely low.

また万一追跡に失敗する場合には、その都度手段Nで最
新の平均値、分析値による中域ウィンドウが設定されて
、高速な目標物再追跡を可能とする。
Furthermore, in the event that tracking fails, the means N sets a middle range window based on the latest average value and analysis value each time, thereby enabling high-speed re-tracking of the target.

本実施例では、2個のマイクロプロセッサを使用して、
マイクロプロセッサ6を入出力コントロール用に、マイ
クロプロセッサ8を演算用に使用しているが、勿論1個
のマイクロプロセッサで入出力コントロールおよび演算
処理を兼用させることも可能である。
In this embodiment, two microprocessors are used to
Although the microprocessor 6 is used for input/output control and the microprocessor 8 is used for calculation, it is of course possible to use one microprocessor for both input/output control and calculation processing.

電気装置制御手段には、照明コントローラ19を含め、
図示20〜29および30に示すコントローラから構成
されている。
The electrical device control means includes a lighting controller 19;
It is composed of controllers shown in figures 20 to 29 and 30.

ラジオコントローラ20は、ラジオの電源オン/オフお
よびボリューム(音量)のステップアップ/ダウンを電
気的に制御するものであり、付勢信号がオンを示すもの
であるとラジオ電源をオンにし、オフを示すものである
とラジオ電源をオフにし、アップを示す付勢信号が1回
到来するとボリュームを1ステツプアツプする。アップ
およびダウンにおいて限度に達するとそこでアップおよ
びダウンをそれぞれ停止する。
The radio controller 20 electrically controls the power on/off of the radio and the step up/down of the volume. When the activation signal indicates on, the radio controller 20 turns on the radio power and turns off the radio. If the signal indicates "up", the radio power is turned off, and when the activation signal indicating "up" arrives once, the volume is increased by one step. When the limit is reached in up and down, up and down are respectively stopped.

エアコンコントローラ21はエアコンのオン/オフのみ
を制御する。室温や空気汚れに対応した、冷房/暖房選
択、パワーアップ/ダウン、クリーナのオン/オフ等は
、エアコン本体(図示せず)のコントローラが制御する
The air conditioner controller 21 only controls on/off of the air conditioner. A controller in the air conditioner itself (not shown) controls cooling/heating selection, power up/down, cleaner on/off, etc. in response to room temperature and air pollution.

オートドライブ(自動定速走行)ユニットは、オートド
ライブが指示されると、その時の走行車速を記憶してそ
の後実車速が記憶車速になるようにスロットル開度を制
御し、オートドライブが解除される(オフ)と、このス
ロットル開度制御を停止する。あるいは、オートドライ
ブが指示されると、予め設定または記憶されている車速
値、もしくはこれらでその時の車速を修正した車速値に
実車速が合致するようにスロットル開度を制御し、オー
トドライブが解除される(オフ)と、このスロットル開
度制御を停止する。いずれの対様でも、アップ指示があ
ると目標車速を1ステップ高く更新設定し、ダウンが指
示されると1ステップ低く更新設定する。オートドライ
ブコントローラ22は、このオン/オフおよびアップ/
ダウンを制御するものであり、付勢信号がオンを示すも
のであると、オートドライブを開始し、アップを示すも
のであると目標車速を1ステップ高く更新設定し、ダウ
ンを示すものであるとlステップ低く更新設定する。
When autodrive is instructed, the autodrive (automatic constant speed driving) unit memorizes the vehicle speed at that time and then controls the throttle opening so that the actual vehicle speed becomes the memorized vehicle speed, and autodrive is canceled. (off) to stop this throttle opening control. Alternatively, when autodrive is instructed, the throttle opening is controlled so that the actual vehicle speed matches a preset or stored vehicle speed value, or a vehicle speed value modified by these, and autodrive is canceled. When it is turned off (off), this throttle opening control is stopped. In either case, when an up command is given, the target vehicle speed is updated and set one step higher, and when a down command is given, the target vehicle speed is updated and set one step lower. The auto drive controller 22 controls this on/off and up/
If the energization signal indicates on, it starts auto drive, if it indicates up, the target vehicle speed is updated and set one step higher, and if it indicates down. Set the update to l step lower.

ドアロックコントローラ23は、ドライバ席ドアに付さ
れているドライバ席ロック/アンロックスイッチおよび
全ドアロック/アンロックスイッチ、および、その他の
ドアに付されている各ドアロック/アンロック付勢を制
御し、かつ、付勢信号(ONloFF)がオンを示すも
のであると、他の阻止条件が成立していない限り、各ド
アを順次にロック付勢する。オフを示す付勢信号が到来
すると、他の阻止条件が成立していない限り、各ドアを
順次アンロック付勢する。
The door lock controller 23 controls the driver seat lock/unlock switch and all door lock/unlock switches attached to the driver seat door, and each door lock/unlock activation attached to other doors. However, if the activation signal (ONloFF) indicates ON, each door is activated to be locked in sequence unless other blocking conditions are satisfied. When the energizing signal indicating OFF arrives, each door is energized to unlock in sequence unless other blocking conditions are satisfied.

サンルーフコントローラ・24は、この例ではスライデ
ィング形のサンルーフを開閉制御するものであり、通常
備わっているスイッチの操作に応答してサンルーフを開
閉駆動制御すると共に、付勢信号(ON10FF/UP
/DOWN)がオンを示すものであるときには、サンル
ーフを全開駆動制御し、オフを示すものであるときには
全閉駆動制御し、アップを示すものであるときには1ス
テツプ(所定開度)だけ閉駆動制御し、ダウンを示すも
のであるときには1ステツプだけ閉駆動する。
In this example, the sunroof controller 24 controls the opening and closing of a sliding sunroof, and controls the opening and closing of the sunroof in response to the operation of a normally provided switch.
/DOWN) indicates on, the sunroof is fully opened, when it is off, it is fully closed, and when it is up, the sunroof is closed by one step (predetermined opening degree). However, when it indicates a down state, it is driven closed by one step.

ウィンドウコントローラ25は、各ドアのスライドガラ
スの開閉(上下)駆動制御を行うものである。コントロ
ーラ25は、通常備わっているスイッチ操作に応じてス
ライドガラスの開閉駆動制御をするとともに、付勢信号
(ON10 F F/UP/DOWN)がオンを示すも
のであると、ドライバ席ドアのスライドガラスを全閉駆
動制御し、オフを示すものであると全開駆動制御し、ア
ップを示すものであると1ステツプだけ閉駆動制御し、
ダウンを示すものであると1ステツプだけ閉駆動制御す
る。
The window controller 25 controls the opening/closing (up and down) driving of the sliding glass of each door. The controller 25 controls the opening/closing drive of the sliding glass in accordance with the operation of a normally provided switch, and when the energizing signal (ON10F/UP/DOWN) indicates ON, the sliding glass of the driver's door is opened/closed. When it indicates OFF, it controls full open drive, and when it indicates up, it controls close drive by one step.
If it indicates a down state, the closing drive is controlled by one step.

ワイパコントローラ26は、通常備わっているスイッチ
操作に応答してワイパの駆動制御をし、付勢信号(ON
10FF/UP/DOWN)がオンを示すときには、標
準速度でワイパ駆動付勢し、オフを示すときにはワイパ
駆動を停止して待機位置に位置決めし、アップを示すと
きにはワイパ速度を1ステップ高く変更し、ダウンを示
すときには1ステップ低く設定する。
The wiper controller 26 controls the drive of the wiper in response to a switch operation normally provided, and outputs an energizing signal (ON).
When 10FF/UP/DOWN) indicates ON, the wiper drive is energized at the standard speed, when it indicates OFF, the wiper drive is stopped and the wiper is positioned at the standby position, and when it indicates UP, the wiper speed is changed one step higher. When indicating down, set one step lower.

シガーライターコントローラ27は、シガーライター引
込み/押出し機構を、付勢信号(ONloFF)がオン
になると引込みに、付勢信号がオフを示すものであると
、所定温度になっていなくても押出しに付勢する。他は
従来と同様であり、引込み状態で機械的な接触によりシ
ガーライターが通電され、所定温度でシガーライターが
自動的に押し出されて通電が断たれる。
The cigarette lighter controller 27 causes the cigarette lighter retraction/extrusion mechanism to be retracted when the energizing signal (ONloFF) is turned on, and to be pushed out even if the cigarette lighter is not at a predetermined temperature when the energizing signal indicates OFF. to strengthen The rest is the same as the conventional one, and the cigarette lighter is energized by mechanical contact in the retracted state, and at a predetermined temperature, the cigarette lighter is automatically pushed out and the energization is cut off.

ヘッドライトコントローラ28は、大灯/小灯/オフス
イッチに応答して該スイッチが大好位置にあるときには
スモールライトを点灯しヘッドライトを格納位置よりあ
げて点灯し、角度指示スイッチの操作に応答して照射角
を設定し、小町位置になるとヘッドライトを消灯してス
モールライトのみを点灯し、オフ位置になるとスモール
ライトを消灯してヘッドライトを格納するのに加えて、
付勢信号(ON10FF/UP/DOWN)がオンを示
すものであると、スモールライトを点灯し、ヘッドライ
トを格納位置より上げて点灯し、付勢信号がアップを指
示するものであるとヘッドライトの照射角を上方に1ス
テップ高くし、ダウン指示するものであると1ステップ
低くし、オフであるとヘッドライトを消灯しスモールラ
イトの点灯のみとする。
The headlight controller 28 responds to the large light/small light/off switch, turns on the small light when the switch is in the preferred position, raises the headlight from the retracted position, and turns on the headlight, and responds to the operation of the angle indicator switch. to set the beam angle, and when the small position is reached, the headlights are turned off and only the small lights are turned on, and when the off position is reached, the small lights are turned off and the headlights are retracted.
When the energizing signal (ON10FF/UP/DOWN) indicates ON, the small light is turned on and the headlight is raised from the retracted position. The illumination angle is raised by one step upwards, and lowered by one step if it is a down command, and if it is off, the headlights are turned off and only the small lights are turned on.

デフロスタコントローラ29は、通常INNわっている
オン/オフスイッチ操作に応じてリアウィンドの埋込み
ヒーターに通′rf1/非通電すると共に、付勢信号(
ONloFF)がオンのときには埋込みヒータに通電し
、オフのときには通電を停止する。
The defroster controller 29 energizes/de-energizes the built-in heater in the rear window according to the on/off switch operation normally set by INN, and also energizes the heater (
When ONloFF) is on, power is supplied to the embedded heater, and when it is off, power is stopped.

ブザーコントローラ30は、付勢信号がオンのときブザ
ー(図示せず)を付勢し、オフのときブザーを停止する
。このブザーは後述するように、ドライバが目を閉じた
状態が所定時間以上継続すると(居眠りと見なして)付
勢される。また、モードスイッチ5Eまたは5Mが閉じ
られているとき(@応答制御およびまたは口応答制御が
指示されているとき)に画像パターン処理が不能となっ
たときに付勢される。
The buzzer controller 30 activates a buzzer (not shown) when the activation signal is on, and stops the buzzer when the activation signal is off. As will be described later, this buzzer is activated when the driver's eyes remain closed for a predetermined period of time or longer (assuming that the driver is dozing off). Further, it is activated when image pattern processing becomes impossible while the mode switch 5E or 5M is closed (@response control and/or mouth response control is instructed).

以上が、実施例のブロックダイヤグラムによる本発明の
構成の概要であり、以下フローチャートにより説明する
。第2a図および第2b図に本発明のメインフローチャ
ートを、第3a図〜第3u図に各機能手段の構造作用を
説明するサブフローチャートを図示する。
The above is an overview of the configuration of the present invention using the block diagram of the embodiment, and will be explained below using the flowchart. 2a and 2b are main flowcharts of the present invention, and FIGS. 3a to 3u are subflowcharts explaining the structure and operation of each functional means.

第2a図および第2b図を参照して、電源が投入される
とマイクロプロセッサ6は、初期化(ステップl、以下
カッコ内ではステップという語を省略する)を実行し、
入出力ボートを初期化して、電気装置19〜30および
テレビカメラ3を待機状態(オフ)に設定し、内部レジ
スタ、カウンタ、フラグ、およびRAMl0,11.1
3をクリアする。そして目標物選定手段Cのスイッチ5
Eおよび5Mのいずれかが閉であると、マイクロプロセ
ッサ6は、照明手段Eの照明灯コントローラ19および
テレビカメラ3にオンを示す付勢信号を与える。5E、
5Mの両者とも開の状態であると、照明灯コントローラ
19およびテレビカメラ3にオフを示す付勢信号を与え
、また電気装置制御手段にのブザーコントローラ30に
オンを示す付勢信号を与えて、ドライバーに警告を与え
る。
Referring to FIGS. 2a and 2b, when the power is turned on, the microprocessor 6 executes initialization (step l, hereinafter the word step will be omitted in parentheses),
Initialize the input/output board, set the electrical devices 19 to 30 and the television camera 3 to the standby state (off), and set the internal registers, counters, flags, and RAMs 10 and 11.1.
Clear 3. And switch 5 of target selection means C
If either E or 5M is closed, the microprocessor 6 provides an energizing signal to the lamp controller 19 of the lighting means E and the television camera 3 to indicate on. 5E,
5M are both open, an energizing signal indicating OFF is given to the illumination light controller 19 and the television camera 3, and an energizing signal indicating OFF is given to the buzzer controller 30 of the electric device control means, Give a warning to the driver.

モード選択スイッチ5Eおよび5Mの少なくとも一方を
閉とすることにより照明コントローラ19および画像入
力手段Aのテレビカメラ3にオンを示す付勢信号を与え
、それらの所定時間(照明灯の明るさが安定し、ドライ
バの顔が運転時の位置に静止するのを待つ時間)の後に
、テレビカメラ3からのフレーム同期パルスに同期して
、1フレーム(256X256画素)分の画像データ(
1画素当たり8ビツトの階調データ)は、フレームメモ
リ13へ書込む(5)。
By closing at least one of the mode selection switches 5E and 5M, an energizing signal indicating ON is given to the lighting controller 19 and the television camera 3 of the image input means A for a predetermined period of time (the brightness of the lighting lamp is stabilized). , the waiting time for the driver's face to stop at the driving position), one frame (256 x 256 pixels) worth of image data (
The gradation data (8 bits per pixel) is written to the frame memory 13 (5).

マイクロプロセッサ6は次に、メモリ13の画像データ
の内、最低レベル(階調O:明るさが最高)の階調から
最高レベル(階調255:最も暗い)の階調にわたって
、その階調を有する画素数を集計し、明るさヒストグラ
ムを作成してRAM10メモリする(6)、のヒストグ
ラムとROM9にメモリしている標準ヒストグラムの偏
差値(各階調当たりの偏差)を求めて、偏差の2乗を加
算し、加算値を参照値と比較して(7)、加算値が所定
範囲を外れている時には、偏差の和に対応してアップま
たはダウンを指示する付勢信号を照明灯コントローラ1
9に与え(10)、それから所定時間(照明灯4の明る
さが新設定に対応した明るさに安定するまでの時間)の
後に、また1フレームの画像テークをメモリ13に読み
込む(5)。このようにして、画像データのヒストグラ
ムが所定の範囲のものになるように照明灯4の明るさを
調整する(5.6.7.10)。
Next, the microprocessor 6 calculates the gradations of the image data in the memory 13 from the lowest level (gradation O: highest brightness) to the highest level (gradation 255: darkest). Calculate the number of pixels, create a brightness histogram, and store it in RAM 10 (6). Calculate the deviation value (deviation per each gradation) between the histogram in (6) and the standard histogram stored in ROM 9, and square the deviation. is added, and the added value is compared with the reference value (7). If the added value is out of a predetermined range, the lighting lamp controller 1 sends an energizing signal to instruct up or down according to the sum of the deviations.
9 (10), and after a predetermined time (time until the brightness of the illumination lamp 4 stabilizes to a brightness corresponding to the new setting), one frame of image take is read into the memory 13 again (5). In this way, the brightness of the illumination lamp 4 is adjusted so that the histogram of the image data falls within a predetermined range (5.6.7.10).

この調整において、照明コントローラ19は、最高の明
るさに設定したときと最低の明るさに設定したときに、
それぞれそれを知らせる信号をマイクロプロセッサ6に
与え、プロセッサ6は、最低の明るさに設定したことを
示す信号を受ける(8)と、照明コントローラ19にオ
フを指示しく11)、そこで明るさの調整を終了し、照
明灯4がオフしてから後に1フレームの画像データの読
取りを行ってメモリ13に書込む(12) 、最高の明
るさに設定したことを示す信号を受けたときには、そこ
で明るさの調整を終了する(9)。
In this adjustment, the lighting controller 19 sets the brightness to the highest brightness and the lowest brightness.
A signal indicating this is sent to the microprocessor 6, and when the processor 6 receives a signal indicating that the lowest brightness has been set (8), it instructs the lighting controller 19 to turn off (11), and then adjusts the brightness. After the illumination lamp 4 is turned off, one frame of image data is read and written to the memory 13 (12). When a signal indicating that the brightness has been set to the maximum is received, the brightness is Finish adjusting the height (9).

明るさの調整を終ると、中域ウィンドウの設定が可能で
あるか否かを、中域ウィンドウ設定可能判定手段Mを構
成する判定手段(12A)で検定する0作動開始の初期
では、初期化(1)のステップで(12A)はクリヤさ
れ、DFLAG=0となっているから、「頭部検出用し
きい値THhの決定」サブルーチン(13)へ進む。
After completing the brightness adjustment, the determining means (12A) constituting the mid-range window setting possibility determining means M tests whether or not the mid-range window can be set. Since (12A) is cleared in step (1) and DFLAG=0, the process advances to the "determination of head detection threshold THh" subroutine (13).

以下画像境界検出手段Eおよび広域ウィンドウ設定手段
Fを構成する 「頭部検出用しきい値THhの決定」サブルーチン(1
3) 「額検出用しきい値THfの決定」サブルーチン「瞳検
出用しきい値THeの決定」サブルーチンと、目標物検
出手段Gを構成する 「頭部検出」 サブルーチン(15) 「額検出」  サブルーチン(22) 「瞳検出」  サブルーチン(27) とを順次実行し、 狭域ウィンドウ設定手段Hを構成する 「瞳追跡用ウィンドウWeの設定」サブルーチン(34
)および rロ追跡用ウィンドウWmの設定」サブルーチンを経て
、瞳の中心位置ECX、ECY、口の中心位置MCX、
MCY、および瞳追跡用狭域ウィンドウWeおよび口追
跡用狭域ウィンドウWmの設定を終り、瞳または口を追
跡する準備を完了する。
The following subroutine (1) for determining the threshold value THh for head detection constitutes the image boundary detection means E and the wide area window setting means F.
3) “Determination of threshold value THf for forehead detection” subroutine “Determination of threshold value THe for pupil detection” subroutine and “Head detection” subroutine that constitutes target object detection means G (15) “Forehead detection” subroutine (22) "Pupil detection" subroutine (27) is sequentially executed, and the "pupil tracking window We setting" subroutine (34) constituting the narrow window setting means H is executed.
) and rro tracking window Wm setting subroutine, the pupil center positions ECX, ECY, the mouth center position MCX,
Setting of MCY, narrow window We for pupil tracking, and narrow window Wm for mouth tracking is completed, and preparations for tracking the pupil or the mouth are completed.

これまでのステップを再び第2a、2b図によって順を
追って説明する。
The steps up to this point will be explained step by step again with reference to FIGS. 2a and 2b.

[頭部検出用しきい値THhの決定]のサブルーチン(
13)でしきい値THhを定め、次に、頭部検出成否を
示すデータを格納するフラグレジスタ5FLAGにまず
「0:不成功」を会込み(14)、「頭部検出」のサブ
ルーチン(15)で、しきい値THhを用いて頭部先端
位置ATY (第4c図)を検出する。検出に成功した
ときはサブルーチン(15)でフラグレジスタ5FLA
Gに1を吉込み、不成功のときは該レジスタ5FLAG
の内容はOのままとする。
[Determination of head detection threshold THh] subroutine (
13), the threshold value THh is determined, and then "0: Unsuccessful" is first set in the flag register 5FLAG that stores data indicating success or failure of head detection (14), and the subroutine for "head detection" (15) is set. ), the head tip position ATY (Fig. 4c) is detected using the threshold value THh. When the detection is successful, flag register 5FLA is set in subroutine (15).
Set 1 to G, and if unsuccessful, set the corresponding register 5FLAG
The content of is left as O.

サブルーチン(15)を終了するとレジスタ5FLAG
の内容をチエツクして(16)、Oであるときには、エ
ラー(不成功)回数をカウントするためのレジスタI 
PDFの内容を1大きい値に更新しく17)、それが1
6以上になっていると、ブザーコントローラ30にブザ
ーオンを指示して(19)、また画像読取り(5)に戻
る。
When subroutine (15) ends, register 5FLAG
(16), and if it is O, register I for counting the number of errors (unsuccessful).
If you want to update the content of the PDF to a value 1 higher than 17), it will be 1.
If it is 6 or more, the buzzer controller 30 is instructed to turn on the buzzer (19), and the process returns to image reading (5).

16未満のときにはブザーは付勢せずに画像読取り(5
)に戻る。
When the value is less than 16, the buzzer is not energized and the image is read (5
).

ステップ16のチエツクにおいてレジスタ5FLAGの
内容が0を越える数であると、[額検出用しきい値TH
fの設定]のサブルーチン(20)を実行する。そして
フラグレジスタ5FLAGをクリアして(21)、「額
検出」のサブルーチン(22)を実行する。このサブル
ーチン(22)で額検出に成功するとレジスタ5FLA
Gに1を四込み、不成功のときにはレジスタ5FLAG
の内容は0のままとする。
If the contents of the register 5FLAG exceeds 0 in the check at step 16, then the [amount detection threshold TH
f setting] subroutine (20) is executed. Then, the flag register 5FLAG is cleared (21), and the "forehead detection" subroutine (22) is executed. If forehead detection is successful in this subroutine (22), register 5FLA
Put 1 in G, and if unsuccessful, register 5FLAG
The content of is left as 0.

「額検出」のサブルーチン(22)を終了するとレジス
タ5FLAGの内容をチエツクして(23)、0である
ときには、エラー(不成功)回数をカウントするための
レジスタI PDFの内容をl大きい値に更新しく17
) 、それが16以上になっているかをチエツクする(
18)、16以上になっているとブザーコントローラ3
0にブザーオンを指示しく19)、また画像読取り(5
)に戻る。16未満のときにはブザーは付勢せずに画像
読取り(5)に戻る。
When the "forehead detection" subroutine (22) is finished, the contents of register 5FLAG are checked (23), and if it is 0, the contents of register IPDF for counting the number of errors (unsuccessful) are increased to a larger value. Update 17
), check if it is greater than or equal to 16 (
18), if it is 16 or higher, the buzzer controller 3
0 to instruct the buzzer to turn on (19), and image reading (5).
). When the number is less than 16, the buzzer is not energized and the process returns to image reading (5).

ステップ23のチエツクにおいてレジスタ5FLAGの
内容がOを越える数であったときには、瞳検出用の定数
を格納するレジスタに1およびに2にそれぞれ0.05
および0.4を書込んで(24)、「瞳検出用しきい値
THeの決定」のサブルーチン(25)を実行する。
If the contents of register 5FLAG exceeds O in the check in step 23, 0.05 is added to each of registers 1 and 2 for storing constants for pupil detection.
and 0.4 are written (24), and the subroutine (25) of "determination of threshold value THe for pupil detection" is executed.

サブルーチン(25)を終了すると、フラグレジスタ5
FLAGを初期化して(26)、「瞳検出」のサブルー
チン(27)を実行する。このサブルーチン(27)で
 第2条件(細かい条件)を満たず検出を行うとレジス
タ5FLAGに2を書込み、第2条件は満たさないが第
1条件(粗い条件)を満たす検出を行うとレジスタ5F
LAGに1を凹込む、第1および第2条件のいずれも満
たさない検出に終ったときにはレジスタ5FLAGの内
容はOとする。
When the subroutine (25) ends, flag register 5
FLAG is initialized (26), and the "pupil detection" subroutine (27) is executed. In this subroutine (27), if a detection is performed without satisfying the second condition (fine condition), 2 is written to register 5FLAG, and if a detection is performed which does not satisfy the second condition but satisfies the first condition (coarse condition), register 5FLAG is written.
When it is detected that neither the first nor second conditions are satisfied, the contents of the register 5FLAG are set to O.

サブルーチン(27)を終了するとレジスタ5FLAG
の内容をチエツクして(28,29)、それが2のとき
にはステップ31以下の瞳の中心位置の演算に進む、レ
ジスタ5FLAGの内容が1のときには、「しきい値変
更」のサブルーチン(30)を実行して、再び「瞳検出
用しきい(1aT Heの決定」のサブルーチン(25
)を実行する。レジスタ5FLAGの内容がOであった
ときには、ステップ17に進む。
When the subroutine (27) ends, register 5FLAG
(28, 29), and if it is 2, proceed to the calculation of the pupil center position in steps 31 and below.If the content of register 5FLAG is 1, the "threshold change" subroutine (30) Execute the pupil detection threshold (determination of 1aT He) subroutine (25) again.
). If the contents of register 5FLAG are O, the process advances to step 17.

さて、レジスタ5FLAGの内容が2のときには、まず
フ゛ザーコントローラ19にブザーオフを指示しく31
)、次にエラーカウントレジスタIPDFをクリアする
(32)、次に[]童の中心位置ECX、ECYの演算
」のサブルーチン(33)を実行して瞳の中心位置デー
タを得て、[瞳追跡用ウィンドウWeの設定」のサブル
ーチン(34)で瞳の中心位置を中心とする所定面積の
小領域を定める0次にサブルーチン(35)でまゆ毛の
両端BRX、BLX (第41図)を検出し、サブルー
チン(36)で目領域を算出し、サブルーチ:/ (3
B ) TO(7)中心位ffiMcX、McY(第4
j図)を検出し、サブルーチン(39)で口の中心位置
を中心とする所定面積の小領域Wmを定める。
Now, when the content of register 5 FLAG is 2, first instruct the buzzer controller 19 to turn off the buzzer.
), then clear the error count register IPDF (32), then execute the subroutine (33) of []Calculating the child's center position ECX, ECY' to obtain the pupil center position data, In the subroutine (34) of ``Setting the window We'', a small area of a predetermined area centered on the center position of the pupil is determined.In the subroutine (35), both ends of the eyebrows BRX and BLX (Fig. 41) are detected, Calculate the eye area in subroutine (36), and subroutine: / (3
B) TO(7) central position ffiMcX, McY (4th
(Fig. j) is detected, and in a subroutine (39), a small region Wm of a predetermined area centered on the center position of the mouth is determined.

さて、瞳追跡用ウィンドウWeおよび口追跡用ウィンド
ウWmの大きさと、瞳および口の現在の中心座標が、こ
れまでのステップで決定されると、中域ウィンドウ設定
可能判定手段(12A)で分離したバイパスと合流し、
以下口1または口の追跡作業を開始する。
Now, when the sizes of the pupil tracking window We and the mouth tracking window Wm and the current center coordinates of the pupils and mouth have been determined in the previous steps, the middle range window setting possibility determining means (12A) separates merges with the bypass,
The following mouth 1 or mouth tracking work is started.

先ず新らしい画像を取り込み(40)、目標物設定手段
Cのスイッチ5を点検しく41)(42)、目標物追跡
手段■を構成する「瞳の追跡」サブルーチン(43)に
進んで瞳の移動を追跡し、成功すれば、目標物の移動の
平均値、分散値算出手段りであるサブルーチン(45)
へ進み、追跡に失敗すれば(5)へ戻る。
First, a new image is captured (40), and the switch 5 of the target object setting means C is checked (41) (42), and the process proceeds to the "pupil tracking" subroutine (43) that constitutes the target object tracking means (■) to move the pupil. is tracked, and if successful, a subroutine (45) is used to calculate the average value and variance of the movement of the target object.
Proceed to (5) if tracking fails.

サブルーチン(45)では、同期速度(1/30秒)で
逐次投入される画像の11g中心位置の座標データを所
定時間(例えば1秒)Rに所定回数(例えば300回)
収集し、所定回数分のデータの平均値および分散値を算
出し、枠設定可能判定フラグレジスタDFLAGを1に
セットし、更に新データの入力の都度、瞳中心の動きの
平均値および分散値を更新し、常時最新のウィンドウ設
定用平均値および分散値を記憶する。この詳細について
は、当該サブルーチン(45)の説明において詳述する
In the subroutine (45), the coordinate data of the 11g center position of the images that are sequentially input at a synchronous speed (1/30 second) is input a predetermined time (for example, 1 second) R a predetermined number of times (for example, 300 times).
collect data, calculate the average value and variance value of the data for a predetermined number of times, set the frame setting possible determination flag register DFLAG to 1, and calculate the average value and variance value of the movement of the pupil center each time new data is input. Update and always store the latest average value and variance value for window settings. The details will be explained in the description of the subroutine (45).

次いで制御信号判別手段Jに進み、「瞳のまばたき判定
」サブルーチン(46)で、瞳のまばたきの時間および
その間隔を算出して、居眠り運転中と判定すれば、ブザ
ーで警告を発し、意図的な信号用まばたきと判定すれば
、所定の信号を電気装置制御手段にへ送信する。
Next, the process proceeds to the control signal determining means J, and in the "blinking of the eyes determination" subroutine (46), the time and interval of the blinking of the eyes are calculated, and if it is determined that the driver is drowsy, a warning is issued with a buzzer to determine whether the driver is intentionally driving. If it is determined that it is a signal blink, a predetermined signal is transmitted to the electrical device control means.

続いて次の「瞳の移動方向による判定」ルーチン(47
)に移り、操作したい機器の所定部に注目したときの瞳
の移動ベクトルを所定値と比較することより、所望の電
気装置制御手段にへ信号を送って(40)ヘリターンす
る。
Next, the next “judgment based on pupil movement direction” routine (47
), by comparing the pupil movement vector when focusing on a predetermined part of the device to be operated with a predetermined value, a signal is sent to the desired electrical device control means, and the process returns to (40).

以上はこの装置の操作を開始した初期状態でのステップ
であり、[目標物移動の平均値および分散値の算出」ル
ーチン(45)で所定回数(例えば300回)データが
集積されるまでは、瞳の追跡に失敗すると(瞳の中心位
置を決定できないときは)、失敗の都度ステップ5に戻
って、上述の各ステップを経由、ステップ33で瞳の中
心位置を求め直す。
The above are the steps in the initial state when the operation of this device is started, and until the data is accumulated a predetermined number of times (for example, 300 times) in the [Calculation of average value and variance value of target movement] routine (45), If tracking of the pupil fails (when the center position of the pupil cannot be determined), the process returns to step 5 each time it fails, and the center position of the pupil is determined again in step 33 via the above-mentioned steps.

しかしながら、ステップ45で所定回数(例えば300
回)データが集積された後は、DFLAGが1にセット
されることにより、追跡に失敗するとステップ12Aの
判定で、ステップ50に進み、ステップ45で記憶され
ている平均値分散(iFによって、中域ウィンドウを設
定し、この中域ウィンドウにより、ステップ51で瞳の
中心を検出し、ステップ40に戻って画像を取り込み、
狭域ウィンドウWeで追跡を続行できることになる(4
3)。
However, in step 45, a predetermined number of times (for example, 300
After the data has been accumulated, DFLAG is set to 1, and if tracking fails, the process proceeds to step 50 as determined in step 12A. A range window is set, and the middle range window is used to detect the center of the pupil in step 51, and the process returns to step 40 to capture the image.
Tracking can be continued in the narrow window We (4
3).

従ってステップ12AでDFLAGが1にセットされた
後は、追跡に失敗しなければ、ステップ40とステップ
47との間で繰返し追跡が高速で行われ、万一追跡に失
敗しても、ステップ50で最新の中域ウィンドウが設定
され、迅速な追跡再開が可能となる。すなわち、設定手
段Nを構成する「中域ウィンドウの設定」サブルーチン
(50)で、新らしい検出用ウィンドウを設定し、高精
度目標物検出手段Pを構成する「中域ウィンドウによる
瞳の検出」サブルーチン(51)で、瞳の検出を行い、
検出に成功すれば、ステップ(40)の画像取込みへ進
んで、瞳の追跡を続行する。
Therefore, after DFLAG is set to 1 in step 12A, if there is no tracking failure, repeated tracking is performed at high speed between step 40 and step 47, and even if tracking fails, step 50 is executed. The latest mid-range window is set, allowing quick resumption of tracking. That is, a new detection window is set in the subroutine (50) for setting a mid-range window that constitutes the setting means N, and a subroutine for detecting pupils using a mid-range window that constitutes the high-precision target detection means P is performed. In (51), the pupils are detected,
If the detection is successful, the process advances to step (40) to capture an image to continue tracking the pupil.

以上が瞳を追跡するときのメインルーチンであり、口を
追跡するルーチンは、ステップ48に、「口の追跡」お
よび「口の移動の、分散値算出」サブルーチンを設け、
前記の中域ウィンドウ設定手段Nおよび中域ウィンドウ
による目標物検出手段Pを、日用に変換することにより
可能となる。
The above is the main routine for tracking the eyes, and the routine for tracking the mouth includes a "mouth tracking" and "variance value calculation of mouth movement" subroutines in step 48.
This becomes possible by converting the medium range window setting means N and the target object detection means P using the medium range window into daily use.

以下者サブルーチンの詳細について説明する。The details of the subroutine will be explained below.

第3a図を参照して「頭部検出用しきい値T I−1h
の決定」のサブルーチン(13)の内容を説明する。こ
のサブルーチン(13)は、マイクロプロセッサ6の指
示に応答してマイクロプロセッサ8が実行する。撮像画
面において、例えば第4a図に示すように、運転席のド
ライバの顔のほぼ全体が1フレームFin内に納まり、
しかも頭部の先端とその背景(車両ルーフの内面)とが
共に存在するように、カメラ3の撮像倍率が定められて
いる。マイクロプロセッサ8は、まず頭部先端と背景と
が共に存在する確率が最も高いように設定(固定)され
ている小領域Htpを、メモリ13の画像データ処理領
域に定めて(55)、領域Ht pの画像データの単純
階調ヒストグラムを演算する(56)、先に説明したよ
うに、画像データは8ビツトであり、階調はO〜255
の、256階調である。この階調ヒストグラムの演算に
おいてプロセッサ8は、領域Htp内の全画像データを
所定順に読出して、同一階調を示す画像の数を、該階調
ごとにカウントする。
Referring to FIG. 3a, "Head detection threshold T I-1h
The contents of the subroutine (13) of ``determination of ``determination'' will be explained. This subroutine (13) is executed by the microprocessor 8 in response to instructions from the microprocessor 6. On the imaging screen, for example, as shown in FIG. 4a, almost the entire face of the driver in the driver's seat is contained within one frame Fin,
Furthermore, the imaging magnification of the camera 3 is determined so that the tip of the head and its background (inner surface of the vehicle roof) are both present. The microprocessor 8 first determines in the image data processing area of the memory 13 a small area Htp that is set (fixed) so that the probability that the tip of the head and the background both exist is highest (55), and A simple gradation histogram of the image data of p is calculated (56).As explained earlier, the image data is 8 bits, and the gradation ranges from O to 255.
There are 256 gradations. In calculating this gradation histogram, the processor 8 reads out all the image data in the area Htp in a predetermined order, and counts the number of images showing the same gradation for each gradation.

次にプロセッサ8は、レジスタBmaxをクリアして(
57)、階調ヒストグラムの平均濃度Mtを算出する(
58)。そして階調レジスタiをクリア(階?JJOを
示すデータの四込み)して(59)、階調ヒストグラム
の中の、階調i(レジスタiの内容)未満の画素数wl
およびその平均濃度Ml、ならびに、階調1以上の画素
数W2およびその平均濃度M2を算出する(60)、す
なわち、階調ヒストグラムを、階調i未満の第1グルー
プと階調1以上の第2グループに区分して、第1グルー
プの画素数W1と平均濃度Ml、および第2グループの
画素数W2と平均濃度M2を算出する0次に、  B=
wl(Ml−Mt)2+w2 (M2−Mt)”を算出
する(61)、すなわち、第1グループの、全体濃度M
しに対するグループ)農度偏差の二乗と、第2グループ
のそれとの和、つまり、第1グループの、識別度Bを算
出する。なお、階調iが領域Ht pを濃度が異なる2
グループに明確に区別するものであるときにBの値が大
きい、すなわちBの値が大きいiが、領域Htpにおい
て背景と頭部(の黒髪)とを区分するしきい値である。
Next, processor 8 clears register Bmax (
57), calculate the average density Mt of the tone histogram (
58). Then, clear the gradation register i (include the data indicating the floor? JJO) (59), and then clear the number of pixels wl in the gradation histogram that are less than the gradation i (contents of register i).
and its average density Ml, the number W2 of pixels with gradation level 1 or higher, and its average density M2 are calculated (60). B=
wl(Ml-Mt)2+w2(M2-Mt)'' (61), that is, the total concentration M of the first group.
The sum of the square of the agricultural degree deviation (for each group) and that of the second group, that is, the discrimination degree B of the first group is calculated. Note that the gradation i is different from the area Htp in density 2
When the group is clearly distinguished, the value of B is large, i.e., the value of B is large.

プロセッサ8は次に、算出したBがレジスタBmaxの
内容以上であるかをチエツクして(62)、是であると
BをレジスタBmaxに更新書込みして(63)、しき
い値レジスタTHhにiを書込む、そしてレジスタiの
内容を、そのときの内容に1を加えたものに更新する(
65)。
Next, the processor 8 checks whether the calculated B is greater than or equal to the contents of the register Bmax (62), and if yes, updates and writes B to the register Bmax (63), and sets i to the threshold register THh. and updates the contents of register i to its current contents plus 1 (
65).

ステップ62で、BがレジスタBmaxの内容未満であ
ったときには、そのままステップ65に進む。
In step 62, if B is less than the contents of register Bmax, the process directly advances to step 65.

次にプロセッサ8は、レジスタiの内容iが256以上
になっている(全階調についてB演算を終了している)
か否かをチエツクする(66)。
Next, the processor 8 determines that the content i of the register i is 256 or more (the B operation has been completed for all gradations).
(66).

否であるとまたステップ6o、61の演算を行う、この
ようにして、レジスタiの内容iが256以上になった
ときには、プロセッサ8がブロツセッサ6に処理終了を
報知し、プロセッサ6がメインルーチン(第2a図)の
進行を再開(ステップ14への進行)する。
If not, the calculations in steps 6o and 61 are performed again. In this way, when the content i of register i becomes 256 or more, the processor 8 notifies the processor 6 that the processing has ended, and the processor 6 returns to the main routine ( 2a) is resumed (proceeding to step 14).

このとき、階調O〜255のそれぞれについてB演算(
60,61)が終了しており、レジスタBmaxには、
演算で得たB全値のうちの最高値が四込まれ、しきい値
レジスタTHhには、最高値を得たときの階調iすなわ
ちしきい値THhが書き込まれている。参考のため、第
4b図に、第4a図に示す画像Fimを、このようにし
て得たしきい値THhで2値化した場合の2値化画像を
示す。
At this time, B calculation (
60, 61) has finished, and register Bmax contains
The highest value of all the B values obtained by the calculation is entered, and the gradation level i at which the highest value is obtained, that is, the threshold value THh is written in the threshold register THh. For reference, FIG. 4b shows a binarized image obtained by binarizing the image Fim shown in FIG. 4a using the threshold value THh obtained in this way.

ステップ14でプロセッサ6は、レジスタ5FLAGを
クリアする。そしてプロセッサ8に「頭部検出」のサブ
ルーチン(15)の実行を指示する。
In step 14, processor 6 clears register 5FLAG. Then, the processor 8 is instructed to execute the "head detection" subroutine (15).

第3b図を参照して「頭部検出」のサブルーチン(15
)の内容を説明する。プロセッサ8は、領域Htpを画
面の副走査方向Yに2倍に拡大した領域2Htp(第4
b図に示す)をメモリ13の画像データ読出し領域に設
定して(67)、ラインレジスタLNに、領域2 Ht
 pの主走査方向Xの最小アドレスデータ(右端位置)
を凹込む68)。
Referring to FIG. 3b, the "head detection" subroutine (15
). The processor 8 enlarges the area Htp by twice in the sub-scanning direction Y of the screen to create an area 2Htp (a fourth area).
b) is set in the image data readout area of the memory 13 (67), and the area 2 Ht is set in the line register LN.
Minimum address data of p in main scanning direction X (right end position)
68).

次に、XアドレスがLN(レジスタLNの内容二以下、
レジスタの記号と同じ記号は、該記号が付されたレジス
タの内容を示す)の垂直ライン(y方向に延びるライン
)上の各画素の画像データをメモリ13より順次に読み
出すとともに、画像データ〔O;最高の明るさ(白)/
255:最低の明るさ(黒))をTHhで2値化して、
黒(T Hh以上の階調データ)の画素数BNPをカウ
ントする(69)、そしてBNPが50を越えるかをチ
エツクして(76)、50を越えないとLNが領t[2
Ht pの左端値)(maxに達したかをチエツクして
(71) 、達していないとレジスタLNの内容を1大
きい値に更新して(72)、また垂直ラインLNの黒画
素数をカウントする(69)、このようにして、垂直ラ
インの1つについて黒画素数BNPが50を越λると、
そこが頭の右端であるとして、そのときのLNを右端レ
ジスタARXに書込む(73)、以上が頭部の右端位置
ARXの検出である。
Next, the X address is LN (contents of register LN 2 and below,
The image data of each pixel on the vertical line (line extending in the y direction) of the register (the same symbol as the register symbol indicates the contents of the register to which the symbol is attached) is sequentially read out from the memory 13, and the image data [O ;Maximum brightness (white)/
255: The lowest brightness (black)) is binarized with THh,
The number of pixels BNP of black (gradation data of T Hh or more) is counted (69), and it is checked whether BNP exceeds 50 (76). If it does not exceed 50, LN is in the area t[2
Check whether the left end value of Ht p) has reached the max (71), and if it has not, update the contents of the register LN to a value larger by 1 (72), and count the number of black pixels on the vertical line LN. (69) In this way, when the number of black pixels BNP exceeds 50 for one of the vertical lines,
Assuming that this is the right end of the head, LN at that time is written into the right end register ARX (73).The above is the detection of the right end position ARX of the head.

次のステップ74〜79では、同様にして頭部の左端位
tlRALXを検出して、これを左端レジスタALXに
書込む、第4C図に右端位1iARXおよび左端位置A
LXを示す。
In the next steps 74 to 79, the left end position tlRALX of the head is similarly detected and written to the left end register ALX.
Indicates LX.

プロセッサ8は次に、頭部AW=ALX−ARXを演算
してこれをレジスタAWに書込み(80)、今度はライ
ンレジスタLNに、領域2Htpの上端のYアドレスY
minを書込んで(81)、水平ラインLNの、THh
以上の黒画素数BNPをカウントする(82)、次にB
NPがAW/2を越えているか否かをチエツクして、A
W/2を越えないとレジスタLNの内容が領域2 Ht
 I)の下端位置Ymaxに達したかをチエツクして(
84)、達していないとレジスタLNの内容を1大きい
1直に更新して(85)、また水平ラインLNの黒画素
数をカウントする(82)、このようにして水平ライン
の1つについ゛C黒画素数BNPがAW/2を越えると
、そこが頭の先端であるとして、そのときのLNを先端
レジスタATYに魯込み(86)、フラグレジスタ5F
LAGに1を四込む(87)。以上が頭部の先端位1f
1ATYの検出である。これを終了するとプロセッサ8
はプロセッサ6に処理終了を報知する。
Next, the processor 8 calculates the head AW=ALX-ARX, writes it to the register AW (80), and then writes it to the line register LN at the Y address Y of the upper end of the area 2Htp.
Write min (81) and write THh of horizontal line LN.
Count the number of black pixels BNP (82), then B
Check whether NP exceeds AW/2 and
If it does not exceed W/2, the contents of register LN will be in area 2 Ht
Check whether the lower end position Ymax of I) has been reached (
84), and if the value has not been reached, the contents of the register LN are updated by one increment (85), and the number of black pixels on the horizontal line LN is counted (82). In this way, for one horizontal line, When the number of C black pixels BNP exceeds AW/2, it is assumed that this is the tip of the head, and the LN at that time is loaded into the tip register ATY (86), and the flag register 5F is loaded.
Add 1 to LAG (87). Above is the tip of the head 1f
1ATY detection. When you finish this, processor 8
notifies the processor 6 of the completion of processing.

プロセッサ6は、この報知に応答してメインルーチンの
進行を再開して、まずレジスタ5FLAGの内容がOか
否かをチエツクして(16)、それがOでない(頭部検
出に成功している)と、プロセッサ8に「額検出用しき
い値THhの決定」サブルーチン(20)の実行を指示
する。
In response to this notification, the processor 6 restarts the main routine and first checks whether the content of the register 5FLAG is O (16), and if it is not O (the head has been successfully detected). ) and instructs the processor 8 to execute the "Determination of forehead detection threshold value THh" subroutine (20).

第3c図に「額検出用しきい値THfの決定」のサブル
ーチン(20)の内容を示す、プロセッサ8は、このサ
ブルーチン(20)ではまず、サブルーチン(88)を
実行して、X=ARXからX=△LX(第4c図参照)
の範囲を左右に2分した、右半分の領域(X=ARX側
)のしきい値THfrを、前述の「頭部検出用しきい値
THhの決定」のサブルーチン(13)の処理と同様に
して、単純階調ヒストグラム演算により決定し、次のサ
ブルーチン(89)で、同様にして左半分の領域(X=
ALX側)のしきい値T Hf t、を決定する0次に
プロセッサ8は、しきい値THfrとしきい値THfL
とを比較して(90)、THfLがTHfrより大きい
とレジスタTHfmにTHfLを書込み(91)、TH
frがT Hf L以上のときにはレジスタTHfmに
THfrを書込む(91)、次に、X=ARXからX=
ALXの範囲を第4C図に示すように領域1〜3に3等
分して、領域1にレジスタTHfrのしきい値THfr
を、領域2にレジスタTHfmのしきい値THfmを、
また領域3にレジスタT Hf Lのしきい値T Hf
 Lを割り当てる(93)、ここでプロセッサ8はプロ
セッサ6に処理終了を報知する。プロセッサ6はこれに
応答してレジスタ5FLAGをクリアして(21)、プ
ロセッサ8に「額検出」のサブルーチン(22)の実行
を指示する。
FIG. 3c shows the content of the subroutine (20) for "determining threshold value THf for forehead detection." In this subroutine (20), the processor 8 first executes the subroutine (88) to X=△LX (see Figure 4c)
The threshold value THfr of the right half region (X = ARX side), which divides the range of Then, in the next subroutine (89), the left half area (X=
The zero-order processor 8 determines the threshold value T Hf t on the ALX side), which determines the threshold value THfr and the threshold value THfL.
(90), and if THfL is larger than THfr, THfL is written to register THfm (91), and TH
When fr is greater than or equal to T Hf L, THfr is written to register THfm (91), and then X=ARX to X=
The range of ALX is divided into three equal regions 1 to 3 as shown in FIG. 4C, and the threshold value THfr of the register THfr is set in region 1.
, threshold value THfm of register THfm in area 2,
Also, in area 3, the threshold value T Hf of the register T Hf L is
L is assigned (93), and here processor 8 notifies processor 6 of the completion of processing. In response, the processor 6 clears the register 5FLAG (21) and instructs the processor 8 to execute the "forehead detection" subroutine (22).

「額検出」のサブルーチン(22)の内容を第3d図に
示す、プロセッサ8は、ラインレジスタLNに頭先端位
置ATYを四込み(94)、レジスタMXL、レジスタ
CKおよびレジスタRLをクリアし、レジスタXPに頭
右端位[ARXを書込む(95)、次にyアドレスがL
Nの水平ラインのARXからALXまでの範囲の画素の
画像データを順次に読み出して、該画素が領域1〜3の
いずれにあるかをチエツクして、領域1にあるときには
THfrを、領域・2にあるときにはTHfmを、また
領域3にあるときにはT Hf bをしきい値として画
像データを2値化して、2値化により白が得られるとそ
のランレングス(連続長)RLをカウントし、ラインL
Nの白ランレングスの最高値をレジスタMXLに魯込む
(96,101−112)、途中で黒が現われると、そ
れまでのカウント値RLをMXLと比較して、今回のカ
ウント値RLがMXLより大きいと、これをレジスタM
XLに更新書込みしてレジスタl) Lをクリアし、そ
の後口が現われると、またランレングスカウントを開始
する。yアドレスがLNの水平ラインのARXからAL
Xまでの範囲につきこれを終了したときには、レジスタ
MXLに該水平ライン中の白画素数連続長の最長値が書
込まれていることになる。
The content of the "forehead detection" subroutine (22) is shown in FIG. 3d. The processor 8 writes the head tip position ATY into the line register LN (94), clears the register MXL, register CK and register RL, and Write the head rightmost position [ARX (95) to XP, then y address is L
The image data of the pixels in the range from ARX to ALX of N horizontal lines are sequentially read out, and it is checked which of the regions 1 to 3 the pixel is in. If the pixel is in the region 1, THfr is changed to the region 2. The image data is binarized using THfm as the threshold when it is in region 3, and THfb as the threshold when it is in region 3. When white is obtained by binarization, the run length (continuous length) RL is counted and the line L
The highest value of the white run length of N is loaded into the register MXL (96, 101-112). When black appears on the way, the previous count value RL is compared with MXL, and the current count value RL is higher than MXL. If it is large, store this in register M
Write an update to XL, clear register l)L, and when the mouth appears, start counting the run length again. ARX to AL of the horizontal line whose y address is LN
When this is completed for the range up to X, the longest value of the continuous length of the number of white pixels in the horizontal line will have been written in the register MXL.

ここでプロセッサ6は、ステップ96からステップ97
に進んで、最長ランレングスMXLがAW/2を越えて
いるかをチエツクする。越えていないと、LNが最大値
255になっているかをチエツクして(98) 、25
5になっていないとレジスタLNの内容を1大きい数に
更新して(99)、また、ステップ95以下の白ランレ
ングス最大値の検出を行う、255になっていると、こ
れは額検出に失敗したことを意味する(レジスタ5FL
AGに1を凹き込まないでメインルーチンに戻るので、
メインルーチンのステップ23からステップ17に進む
ことになる)。
Here, the processor 6 performs steps 96 to 97.
Proceed to and check if the longest run length MXL exceeds AW/2. If not, check if LN has reached the maximum value of 255 (98), 25
If the value is not 5, the contents of register LN are updated to a number larger by 1 (99), and the maximum value of the white run length below step 95 is detected. If it is 255, this is used for forehead detection. It means that it has failed (Register 5FL
Since we return to the main routine without putting 1 in AG,
The main routine proceeds from step 23 to step 17).

さて、ステップ97でMXL>AW/2であると、この
ときのLNが額の上位(i7HWにHXLを魯込み、額
位置レジスタHWにMXLを書込み、額位置レジスタH
TYにLNを書込み、レジスタ5FLAGに1を書込む
(100)、これを終了すると、プロセッサ8はプロセ
ッサ6に処理終了を報知する。この時点では、レジスタ
HT Yに額の上位11qATYが、レジスタHRXに
額の右端位1iZ HRXが、レジスタHL Xに額の
左端位置HLXが、またレジスタHWに額上端の幅HW
が、書込まれている。これらを第4d図に示す。
Now, if MXL>AW/2 in step 97, LN at this time is the upper part of the forehead (write HXL to i7HW, write MXL to forehead position register HW, and write MXL to forehead position register HW).
Writes LN to TY and writes 1 to register 5 FLAG (100). When this is completed, processor 8 notifies processor 6 of the completion of processing. At this point, register HT Y has the upper 11qATY of the amount, register HRX has the rightmost position 1iZ HRX of the amount, register HLX has the leftmost position HLX of the amount, and register HW has the width HW of the upper end of the amount.
is written. These are shown in Figure 4d.

プロセッサ6は、上記終了報知を受けると、フラグレジ
スタSFLΔGの内容をチエツクする(23)、すなわ
ち額検出に成功したか否かをチエツクする。そして5F
LAGの内容が0(失敗)であるとステップ17に進む
、1(成功)であると、レジスタKtに0.05を、レ
ジスタに2に0.4を書込んで(24)、プロセッサ8
に、「瞳検出用しきい値THeの決定」のサブルーチン
(25)の実行を指示する。
When the processor 6 receives the completion notification, it checks the contents of the flag register SFLΔG (23), that is, it checks whether or not the forehead detection was successful. And 5th floor
If the content of LAG is 0 (failure), the process proceeds to step 17; if the content is 1 (success), 0.05 is written to register Kt, 0.4 is written to register 2 (24), and processor 8
The subroutine (25) of "determination of threshold value THe for pupil detection" is instructed to be executed.

第3e図に、「瞳検出用しきい値’I’ Heの決定」
のサブルーチン(25)の内容を示す、これは、画面の
領域Sd(第4d図)において、眉毛、瞳などの縁(階
調が極端に変化する縁:黒エツジ)である画素の総和が
、それらの画素を他と区分するのに適した所定回、とな
るしきい値T Heを検出するものである。プロセッサ
8は、まず座標(HRX、HTY) と(HRX+HW
/2、HTY+HW)とを対角点とする領域Sdを定め
て(113) 、領域Sdの差分階調ヒストグラムを演
算する(114)、すなわち、領域Sd内に存在する画
素の画像データが示す階調をiとし、階調iである画素
のSd内の数を01とし、これらの画素それぞれjの階
:AIより、y方向で画素jより1つ前(yカ月小さい
値)の画素の階調を減算した差分をdDjとすると、階
調i(0〜255)のそれぞれについて、差分の2乗平
均f1M DFMi=[Σ(dDj)”]/ni を算出する。なお、差分の絶対値の平均値でもよい。そ
して、平均値DFMiが最高値DFMmaxである階調
iから、該階調iをしきい値に定めて(i t 5) 
、領域Sdの画像データを2値化して、これにより黒と
なる画素の数sbをカウントして(116) 、領域S
dの全画素数Sに対するsbの比Sb/Sが、所定範囲
に+<Sb/S<K2にあるかをチエツクする(117
)、KIおよびに2は、それぞれメインルーチン(第2
a図)のステップ24で設定した0、05及び0゜4で
ある。該所定範囲にないと、階調iを、次に大きい、差
分の2乗平均値をもたらした階調に更新して(118)
 、それをしきい値としてSdの画像データを2値化し
、2゜値化画像の黒画素数Sが、同様にK l< S 
b / S < K 2を満たすものであるかをチエツ
クする(116.117)。該所定範囲にあると、その
ときレジスタiに書込んでいる階調iをしきい値レジス
タT Heに四込み(119)、プロセッサ6に処理終
了を報知する。
In Figure 3e, "Determination of pupil detection threshold 'I'He"
This shows the content of the subroutine (25), which means that in the screen area Sd (Figure 4d), the sum of pixels that are the edges of eyebrows, eyes, etc. (edges where the gradation changes extremely: black edges) is A threshold value T He that is a predetermined number of times suitable for distinguishing those pixels from others is detected. Processor 8 first calculates the coordinates (HRX, HTY) and (HRX+HW
/2, HTY+HW) as the diagonal point (113), and calculates the difference tone histogram of the area Sd (114), that is, the gradation indicated by the image data of the pixels existing in the area Sd. Let the gradation be i, and the number in Sd of pixels with gradation i be 01, and the gradation of each of these pixels j: From AI, the gradation of the pixel that is one previous (value y months smaller) than pixel j in the y direction. Assuming that the difference obtained by subtracting the tone is dDj, the square mean of the difference f1M DFMi=[Σ(dDj)"]/ni is calculated for each tone i (0 to 255). Note that the absolute value of the difference is An average value may be used.Then, from the gradation i where the average value DFMi is the highest value DFMmax, the gradation i is set as the threshold value (i t 5).
, binarize the image data of the area Sd, count the number sb of pixels that become black as a result (116),
Checks whether the ratio Sb/S of sb to the total number of pixels S of d is within a predetermined range +<Sb/S<K2 (117
), KI and NI2 are the main routine (second
These are 0, 05, and 0°4 set in step 24 of Fig. a). If it is not within the predetermined range, update the gradation i to the gradation that yields the next largest root mean square value of the difference (118).
, the image data of Sd is binarized using it as a threshold, and the number of black pixels S of the binarized image similarly satisfies K l< S
Check whether b/S<K2 is satisfied (116.117). If it is within the predetermined range, the gradation level i written in the register i at that time is written into the threshold value register THe (119), and the processor 6 is notified of the end of the process.

プロセッサ6はここでレジスタ5FLAGをクリアして
(26)、プロセッサ8に「瞳検出」のサブルーチン(
27)の実行を指示する。
The processor 6 clears the register 5FLAG (26), and the processor 8 instructs the processor 8 in the "pupil detection" subroutine (
27).

第3f図に「瞳検出」のサブルーチン(27)の内容を
示す、プロセッサ8はこれにおいて、領域Sdの上端H
TYから下端HTY+HWまでの範囲の画像データなT
Heで2値化して、2値化画像のなかの黒領域それぞれ
の寸法を演算して、それが目の寸法に合致するか否かを
判定し、良く合致する場合にはレジスタ5FLAGに2
を書込み、良く合致しないが目らしきものを検出してい
る場合には5FLAGに1を得込む、いずれも検出でき
なかったときには5FLAGの内容は0のままとする。
FIG. 3f shows the contents of the "pupil detection" subroutine (27).
Image data T ranging from TY to the lower end HTY+HW
Binarize with He, calculate the dimensions of each black area in the binarized image, determine whether it matches the eye size, and if it matches well, set 2 to register 5FLAG.
If an eye-like object is detected although it does not match well, 5FLAG is set to 1. If nothing is detected, the contents of 5FLAG are left as 0.

すなわち、まずレジスタCKをクリアし、ラインレジス
タLNに前線HTYの次のラインN。
That is, first, register CK is cleared, and line N next to front line HTY is stored in line register LN.

を四込み(120)、水平ラインLNの、Sd領域内の
画像データをしきい値THeで2値化して、これにより
黒となる画素の数BPNを検出する(121) 、そし
てそのラインの黒画素数BPNを4と比較する(122
)、これは、そのラインがある黒領域のY方向始端であ
るか否かを検出するためである。4以下(始端ではない
)であると、Y方向走査位置がSdの下端に達している
か否かをチエツクして(123)、達していないとレジ
スタLNの内容を1大きい数に更新して(124)、ま
たラインLNの黒画素数BPNを検出しく121)、そ
れを4と比較する(122)。
(120), the image data in the Sd area of the horizontal line LN is binarized using the threshold value THe, and the number of black pixels BPN is detected (121), and the black of that line is Compare the number of pixels BPN with 4 (122
), this is to detect whether or not that line is the starting end of a certain black area in the Y direction. If it is 4 or less (not the start end), it is checked whether the Y direction scanning position has reached the lower end of Sd (123), and if it has not, the contents of register LN are updated to a number larger by 1 ( 124), the number of black pixels BPN of the line LN is detected 121), and it is compared with 4 (122).

BPNが4を越すと、ある黒領域のY方向始端を検出し
たとして、最大黒画素数レジスタMXLにBPNを古込
み、縦幅レジスタWをクリアし、黒領域上始端レジスタ
TPにLNを書込み、黒領域下終端レジスタBPにもL
Nを四込む(127)、そしてY方向走査位置がSdの
下端に達しているか否かをチエツクして(128)、達
していないと、レジスタLNの内容を1大きい数に更新
しく129)、ステップ121と同様に黒点数をカウン
トする(130)、そしてカウント値BPNを4と比較
して(131)、4以上であるとまだ黒領域がこのLN
ラインにもあると見て、最高黒点数レジスタMXLの内
容をBPNと比較しく132) 、BPNの方が大きい
とレジスタMXLにBPNを更新書込みする(133)
、そしてまたY方向走査位置がSdの下端に達している
か否かをチエツクして(128)、達していないと同様
に次のラインの黒点数のカウント(129,130)及
びカウント値BPNの4との比較(131)を行う、順
次にライン位ti2LNを大きいy値に更新してこれを
行い、BPNが4未満となると、1つの黒領域のy方向
下端に達したとして、下端位置レジスタBPにLNを書
込み、縦幅レジスタWに、BP−’rp+lを書込む(
134)、そして、このように検出した黒領域の縦幅W
がHW/20を越えている(瞳の場合は越える)かをチ
エツクして(135)、越えていると横幅MXLがHW
/15を越えている(瞳の場合は越える)かをチエツク
して(136)、越えていると縦幅に対する横幅の比M
XL/W(瞳の場合、まぶたがふさがっていないと1で
ある)が3以下かをチエツクする(137)、3以下で
あると瞳を検出したとして、瞳縦幅レジスタEYEWに
Wを書込み、瞳下端位置レジスタETYにTPを書込み
、瞳下端位置レジスタEBYにBPを書込み、フラグレ
ジスタ5FLAGに確からしく瞳を検出したことを示す
2を凹込む(138)。
When BPN exceeds 4, it is assumed that the starting edge of a certain black area in the Y direction is detected, and the BPN is stored in the maximum black pixel number register MXL, the vertical width register W is cleared, and LN is written in the black area upper starting edge register TP. The black area lower end register BP is also L.
Enter N by four (127), and check whether the Y direction scanning position has reached the lower end of Sd (128), and if it has not, update the contents of register LN to a number larger by one (129), Count the number of black dots in the same way as step 121 (130), and compare the count value BPN with 4 (131). If it is 4 or more, the black area is still in this LN.
Seeing that it is also on the line, compare the contents of the maximum sunspot number register MXL with BPN (132), and if BPN is larger, update and write BPN to register MXL (133)
, and also checks whether the Y-direction scanning position has reached the lower end of Sd (128), and if it has not, similarly counts the number of black dots on the next line (129, 130) and counts the count value BPN of 4. This is performed by sequentially updating the line position ti2LN to a larger y value, and when BPN becomes less than 4, it is assumed that the lower end of one black area in the y direction is reached, and the lower end position register BP is compared with (131). Write LN to , and write BP-'rp+l to vertical width register W (
134), and the vertical width W of the black area detected in this way
Checks whether it exceeds HW/20 (in the case of eyes, it exceeds it) (135), and if it does, the width MXL is HW.
Check whether it exceeds /15 (in the case of pupils, it exceeds) (136), and if it exceeds, the ratio of width to height M
Checks whether XL/W (in the case of a pupil, it is 1 if the eyelids are not closed) is 3 or less (137). If it is 3 or less, it is assumed that a pupil is detected, and W is written in the pupil height register EYEW. TP is written in the pupil lower end position register ETY, BP is written in the pupil lower end position register EBY, and 2 is written in the flag register 5FLAG, indicating that the pupil has been detected with certainty (138).

そしてステップ139を経てステップ140から、CK
=Oであるのでステップ141に進んで、レジスタ5F
LAGをクリアしてレジスタCKに1を書込んで、又引
き続く次の水平ラインから、上述(7)MXL、W、T
P及びBP等、次の黒領域の各値の検出を行う(124
−121−・・・127〜137)、前述のように第1
回目に確からしく瞳を検出した、としたのは通常の場合
、まゆ毛であるので、次に同様に確からしく瞳を検出し
たときを間違いなく瞳であると定めるため、更に同様に
Y方向で下方のもう1つの黒領域の各値の検出を行うよ
うにしている。
Then, from step 140 via step 139, CK
=O, so proceed to step 141 and register 5F.
Clear LAG, write 1 to register CK, and start from the next horizontal line as described above (7) MXL, W, T.
Detect each value of the next black area, such as P and BP (124
-121-...127-137), the first
The first time the pupil is detected with certainty, it is usually the eyebrows, so the next time the pupil is detected with certainty, it is definitely the pupil. Each value of the other black area is detected.

この、第2回目の確からしく瞳を検出するフローにおい
て、上述と同様にステップ13Bで検出した各値をレジ
スタに書込んで、ステップ139に進み、そこからステ
ップ140に進むと、今度はCK= 1であるので、「
瞳検出」のサブルーチン(27)を終了し、プロセッサ
6に処理終了を報知する。ところで、ステップ137の
条件が満たされなかったとき、すなわちMXL/Wが3
を越^ているときは、これは2値画像で目全体およびま
たはその周りが瞳と一体か、あるいはまゆ毛と目とが連
続して、例えば第4g図の(a)あるいは第4h図の(
a)のように、大きな黒領域を形成している確率が高い
In this second reliable pupil detection flow, each value detected in step 13B is written in the register in the same way as described above, and the process proceeds to step 139, and from there to step 140. This time, CK= 1, so “
The pupil detection subroutine (27) is terminated, and the processor 6 is notified of the end of the process. By the way, when the condition of step 137 is not satisfied, that is, MXL/W is 3.
When it exceeds ^, this is a binary image in which the entire eye and/or its surroundings are integrated with the pupil, or the eyebrows and the eye are continuous, such as (a) in Figure 4g or ((a) in Figure 4h).
As shown in a), there is a high probability that a large black area is formed.

この場合には、この黒領域に瞳があるだろう(瞳らしき
ものを検出した)として、瞳下端位置レジスタETYに
TPなり込み、瞳下端位置レジスタEBYにBPを凹き
込むが、レジスタ5FLAGにはlを書込んで(142
) 、ステップ139に進み、そこからステップ124
に進む。
In this case, it is assumed that there is a pupil in this black area (something that looks like a pupil has been detected), and TP is entered in the pupil lower end position register ETY, and BP is entered in the pupil lower end position register EBY, but in register 5FLAG. writes l (142
), proceed to step 139 and from there to step 124
Proceed to.

さて、黒点数カウント値BPNが4未満で領域Sdの下
端(HTY+HW)にy走査が進むと、ステップ122
−123を経てステップ125でレジスタCKの内容が
1であるかをチエツクする。これが1であると、1回は
確からしく瞳を検出した(ステップ137−138−1
39−140−141を実行した)が、その後もう1度
は同様な検出をしなかったことになるので、第1回の検
出値を瞳検出値とするように、フラグレジスタ5FLA
Gに2を再書込みして(126) 、このサブルーチン
(27)を終了する。レジスタ5FLAGの内容はO(
検出失敗)又はl (不確定であるが瞳らしきものを検
出した:第4g図の(a)又は第4h図の(a))であ
る、このときにはそこでサブルーチン(27)を終了す
る。
Now, when the sunspot number count value BPN is less than 4 and the y scan advances to the lower end (HTY+HW) of the area Sd, step 122
-123, and then in step 125, it is checked whether the contents of register CK are 1 or not. If this is 1, the pupil was reliably detected once (steps 137-138-1
39-140-141), but since the same detection was not performed again after that, the flag register 5FLA is set so that the first detection value is the pupil detection value.
2 is rewritten in G (126), and this subroutine (27) is ended. The contents of register 5FLAG are O(
(Detection failure) or l (An undetermined pupil-like object was detected: (a) in Fig. 4g or (a) in Fig. 4h). In this case, the subroutine (27) is ended there.

このようにサブルーチン(27)を終Tすると、プロセ
ッサ8はプロセッサ6に処理終了を報知する。
When the subroutine (27) ends T in this manner, the processor 8 notifies the processor 6 that the processing has ended.

プロセッサ6はこれに応答して、フラグレジスタ5FL
AGの内容をチエツクしく28゜29)、それが1であ
ると、瞳形状を更に明確にした2値画像を得るために「
しきい値の変更」のザブルーチン(30)を実行する。
In response, the processor 6 registers the flag register 5FL.
Check the contents of AG28゜29), and if it is 1, in order to obtain a binary image with a clearer pupil shape,
Execute the subroutine (30) of "Change threshold value".

その内容を第3g図に示す、すなわち、レジスタK l
の内容に、0.7を乗じた値をレジスタに、に更新書込
みし、レジスタに2の内容に、0.7を乗じた値をレジ
スタに2に更新書込みする(143)、そしてメインル
ーチンに戻って、[瞳検出用しきい値THeの決定」の
サブルーチン(25)を実行する。この内容は第3e図
に示すものであるが、ここでは、ステップ117のに1
及びKNの値が前回の値の0.7倍になっているため、
ここで決定されたしきい値THeは前回のものよりも大
きい値になっており、次の、「瞳検出」のサブルーチン
(27)で領域Sdの画像データを2値化すると、黒領
域の面積が小さいものとなり、例えば、目周りの黒領域
が第4g図の(b)又は第4h図の(b)に示すように
、目形状が現われるようになる。従って、レジスタ5F
LAGに2を書込む可能性が高い、なお、今回の「瞳検
出」のサブルーチン(27)の実行でもフラグレジスタ
5FLAGに1が書込まれると、同様に「しきい値変更
」のサブルーチン(30)、「瞳検出用しきい値TI(
eの決定」のサブルーチン(25)および「瞳検出」の
サブルーチン(27)を実行する。
Its contents are shown in FIG. 3g, namely register K l
Update and write the value obtained by multiplying the contents of 2 by 0.7 to the register, update and write the value obtained by multiplying the contents of 2 by 0.7 to the register 2 (143), and then return to the main routine. Returning, the subroutine (25) of ``Determination of pupil detection threshold value THe'' is executed. This content is shown in FIG. 3e, but here, step 117
Since the value of and KN is 0.7 times the previous value,
The threshold THe determined here is a larger value than the previous one, and when the image data of the area Sd is binarized in the next "pupil detection" subroutine (27), the area of the black area is For example, the black area around the eye appears in the shape of the eye as shown in FIG. 4g (b) or FIG. 4h (b). Therefore, register 5F
There is a high possibility that 2 will be written to LAG. Furthermore, if 1 is written to flag register 5FLAG even in the execution of the current "pupil detection" subroutine (27), the "threshold change" subroutine (30) will be written in the same way. ), “pupil detection threshold TI (
The subroutine (25) for "determination of e" and the subroutine (27) for "pupil detection" are executed.

第4e図に瞳の形状と検出f+′riとの関係を示し、
第4f図にすでに得た検出値から定まる右目領域を示す
Figure 4e shows the relationship between the pupil shape and the detected f+'ri,
Fig. 4f shows the right eye area determined from the detected values already obtained.

さて、「瞳検出」のサブルーチン(27)でレジスタ5
FLAGに2が書込まれているときには、プロセッサ6
は、ブザーコントローラ30にブザーオフを指示しく3
1)、エラーカウントレジスタIPDFをクリアして(
32)、サブルーチン33で、検出した右目の瞳の中心
位置ECX、ECYを演算する。これは、第4f図に示
す領域(座標(HRX、ETY) と(HRX+HW/
2、EBY)を対角点とする矩形領域〕を右目領域と見
なして、その領域の、T Heによる2値化データをマ
イクロプロセッサ8に与えて重心演算(黒画素分布の中
心演算)をさせて重心位置データをもらい、これを画像
フレーム上のアドレスに変換する。これにより得る中心
位置データがx=EcX、y=EcYである。
Now, in the "pupil detection" subroutine (27), register 5
When 2 is written to FLAG, processor 6
3 instructs the buzzer controller 30 to turn off the buzzer.
1), clear the error count register IPDF (
32) In subroutine 33, the detected center positions ECX and ECY of the right pupil are calculated. This is the area shown in Figure 4f (coordinates (HRX, ETY) and (HRX+HW/
2. A rectangular area whose diagonal point is EBY) is regarded as the right eye area, and the binarized data of that area by THe is given to the microprocessor 8 to perform gravity center calculation (center calculation of black pixel distribution). Obtain the center of gravity position data and convert it to an address on the image frame. The center position data obtained by this is x=EcX, y=EcY.

次にマイクロプロセッサ6は、中心位置データECX、
ECYを中心とした、瞳の追跡走査領域を定めるウィン
ドウWe(第5a〜5f図)を設定する(34)。ウィ
ンドウWeの領域は、ECX−EW NECX+EW。
Next, the microprocessor 6 outputs center position data ECX,
A window We (FIGS. 5a to 5f) defining the pupil tracking scanning area centered on ECY is set (34). The area of window We is ECX-EW NECX+EW.

ECY−EW NECY+EW、 であり、EWは瞳の巾である。このウィンドウWeは、
■フレームの面積にたいして非常に小さい領域である。
ECY-EW NECY+EW, where EW is the width of the pupil. This window We is
■It is a very small area compared to the area of the frame.

次にまゆ毛の両端BRX、BLX (第41図)を検出
する(35)、この実施例では、まゆ毛の形状や位置に
対応した電気装置の付勢IJ制御は行わないが、目領域
検出のための走査範囲を求めるためにこれを行う、この
まゆ毛の両端BRX、BLX検出(35)においては、
X方向走査範囲をHRX−HLXとし、y方向走査範囲
をETY−HW/2〜ETY−17EYENとし、走査
ラインなX方向として、該範囲内の走査ライン毎に黒画
素数をカウントして、カウント数が最大のラインの最右
端の黒画素のXアドレスBRXを右端位置として、又最
左端の黒画素のXアドレスBLXを左端位置としてメモ
リする。この検出に失敗すると第2a図のステップ17
に進む。
Next, both ends BRX and BLX (Fig. 41) of the eyebrows are detected (35). In this embodiment, the energization IJ control of the electric device corresponding to the shape and position of the eyebrows is not performed, but it is necessary to detect the eye area. In detecting both ends of the eyebrows BRX and BLX (35), this is done to find the scanning range of
The X-direction scanning range is HRX-HLX, the y-direction scanning range is ETY-HW/2 to ETY-17EYEN, and the number of black pixels is counted for each scanning line within the range, assuming that the scanning line is the X direction. The X address BRX of the rightmost black pixel of the line with the largest number is memorized as the rightmost position, and the X address BLX of the leftmost black pixel is memorized as the leftmost position. If this detection fails, step 17 in Figure 2a
Proceed to.

次に口検出のための走査領域を演算し、該領域のしきい
値を決定する(36)、すなわち、口検出のための走査
領域を、BRX〜BLX、ETY−EMW〜255(フ
レーム下端)に設定する(第4j図)。BMWは定数で
ある。そしてサブルーチン(25)の差分階調ヒストグ
ラム演算によるしきい値の決定と同様にして、該走査領
域のしきい値T Hmを設定し「瞳検出」のサブルーチ
ン(27)と同様にして口検出を行い、充分に検出でき
なかったときには「しきい値の変更」のサブルーチン(
30)と同様にして、充分に検出できるしきい値を設定
する。
Next, a scanning area for mouth detection is calculated and a threshold value for the area is determined (36). In other words, the scanning area for mouth detection is set to BRX~BLX, ETY-EMW~255 (lower edge of the frame). (Figure 4j). BMW is a constant. Then, in the same manner as the threshold value determination by the differential tone histogram calculation in subroutine (25), the threshold value T Hm of the scanning area is set, and the mouth detection is performed in the same manner as in the "pupil detection" subroutine (27). If sufficient detection is not possible, the "Change threshold value" subroutine (
In the same manner as in 30), set a threshold value that allows sufficient detection.

次ニコノ領域BRX−BLX%ETY−EMW〜255
の画像データをしきい値THmで2値化して、2値化画
像をx=BRX、y=ETY−EMWを始点としかつ走
査ラインを横(X)として操作し、ライン毎に黒画素の
数をカウントし、−ラインの黒画素数のカウントを終了
する毎にカウント値を保持している最大f1mと比較し
、今回うインのカウント値が大きいとこれを最大値とし
て更新保持する。このようにして、ライン毎の黒画素数
のカウント値が、全ラインのカウント数よりも増加して
いるときには次のラインに走査をすすめる。そして、今
回ラインのカウント値が保持している最大値より小さい
と、その直前のラインが口の水平線(上唇と下唇との接
線)にかかっていたと見なして、該直前のラインのyア
ドレスMCY(第4j図)を口の中心のXアドレスとし
てメモリし、かつ、該直前のラインの黒始端と黒終端の
中間の値MCXを口の中心のXアドレスとしてメモリす
る(口の中心位置MCX、MCYの演算:38)、検出
に失敗したときには第2a図のステップ17に進む。
Next Nicono area BRX-BLX%ETY-EMW~255
The image data of is binarized with a threshold value THm, and the binarized image is operated with x=BRX, y=ETY-EMW as the starting point, and the scanning line is horizontal (X), and the number of black pixels for each line is calculated. , and each time the counting of the number of black pixels of the - line is completed, the count value is compared with the maximum f1m held, and if the count value of the negative line is large this time, it is updated and held as the maximum value. In this way, when the count value of the number of black pixels for each line is greater than the count value of all lines, scanning is proceeded to the next line. If the count value of the current line is smaller than the maximum value held, it is assumed that the line just before it was on the horizontal line of the mouth (the tangent line between the upper and lower lips), and the y address MCY of the line just before it is (Fig. 4j) is memorized as the X address of the center of the mouth, and the value MCX between the black start end and the black end of the previous line is memorized as the X address of the center of the mouth (mouth center position MCX, Calculation of MCY: 38) If detection fails, proceed to step 17 in FIG. 2a.

次に、マイクロプロセッサ6は、中心位置データMCX
、MCYを中心にした、口の追跡走査領域をさだめるウ
ィンドウWm(第8a図)を設定する(39)、ウィン
ドウWmの領域は、MCX−0,6MW−MCX+0.
6 MW。
Next, the microprocessor 6 generates center position data MCX.
, MCY, a window Wm (FIG. 8a) is set (39) to capture the tracking scanning area of the mouth, and the area of the window Wm is MCX-0, 6MW-MCX+0 .
6 MW.

MCY−MH−MCY+MH1 でありMWは口の巾、MHは口の高さであり、これをメ
モリする。このウィンドウWmは、画像lフレームの面
積に対して非常に小さい範囲である。
MCY-MH-MCY+MH1 where MW is the width of the mouth and MH is the height of the mouth, which are stored in memory. This window Wm is a very small range compared to the area of the image l frame.

プロセッサ6は次に、新たに1フレ一ム分の画像データ
をメモリ13に読み込み(40)、それを2値化して2
値画イ象データをメモリ11に書込む、この2値化にお
いて、ウィンドウWeの領域は前述のTHeで、ウィン
ドウWmの領域は前述の’l’Hmで、画像データを2
値化する。
Next, the processor 6 newly loads the image data for one frame into the memory 13 (40), binarizes it, and converts it into 2
In this binarization in which value image data is written to the memory 11, the area of the window We is the above-mentioned THe, the area of the window Wm is the above-mentioned 'l'Hm, and the image data is written into the memory 11.
Value.

この2値化の後に、スイッチ5Eがオンであれば「瞳の
追跡J  (43)を実行し、又、スイッチ5Mがオン
であれば「口の追跡J  (48)を実行する。
After this binarization, if the switch 5E is on, ``pupil tracking J (43)'' is executed, and if the switch 5M is on, ``mouth tracking J (48) is executed.

「瞳の追跡J  (43)の内容を、第3h図及び第3
1図を参照して説明する。尚、ウィンドウWeの領域は
しきい値THeで、ウィンドウWmの領域では、しきい
値THm (サブルーチン36で決定したもの)で、他
の領域であって領域1に属するところはしきい値THf
rで、領域2に属するところはしきい値THfrで、又
領域3に属するところはしきい値T Hf L、で2 
(+i化して、このように2値化したlフレーム分の画
像データをメモリ11に魯込む。
``The contents of pupil tracking J (43) are shown in Figure 3h and 3.
This will be explained with reference to FIG. Note that the window We area has a threshold value THe, the window Wm area has a threshold value THm (determined in subroutine 36), and other areas belonging to area 1 have a threshold value THf.
r, the area belonging to region 2 is the threshold value THfr, and the area belonging to the area 3 is the threshold value T Hf L, which is 2
(The image data for l frames thus binarized is loaded into the memory 11.

瞳の追跡(43)に進むと、前の瞳の中心にウィンドウ
をセットしく501)、サブルーチン「ラインスキャン
J  (502)に入る。(第3h図参照) サブサブルーチン「ラインスキャンJ  (502)で
は(第31図参照)、該ウィンドウWeの中心X座標デ
ータを上から下方向に縦走査して黒連続数のカウントを
して、カウント値が所定数になると、瞳の上端MTY 
(第5a図)を検出したとして(144,145)、そ
の時のyアドレスMTYをメモリし、次にX座標をその
ままとして下から上に走査して、黒画素の連続数をカウ
ントし、カウント値が、所定数になると、瞳の下端MB
Yを検出したとしてその時のyアドレスMBYをメモリ
しく146)、次に上下端の中心WCY (縦方向の中
心位置)を演算する(147)、次にX座標をWCYに
設定して右から左に水平走査して瞳の右端MRX (第
5b図)を検出してそのアドレスMRXをメモリしく1
48)、次に左から右に走査して瞳の左端MLX (第
5b図)を検出して、そのアドレスMLXをメモリしく
149)、水平方向の左右端の中心WCXを演算しく1
50)、得たデータWCX、WCYを一応瞳の中心と見
なして、リターンする。
Proceeding to pupil tracking (43), a window is set at the center of the previous pupil (501), and subroutine ``Line Scan J'' (502) is entered (see Figure 3h). (See FIG. 31), the center X coordinate data of the window We is vertically scanned from top to bottom to count the number of consecutive blacks, and when the count value reaches a predetermined number, the upper end of the pupil MTY
(Fig. 5a) is detected (144, 145), the y address MTY at that time is memorized, and then the X coordinate is kept as it is, scanning from bottom to top, counting the number of consecutive black pixels, and counting the number of consecutive black pixels. However, when the number reaches a predetermined value, the lower end of the pupil MB
Assuming that Y is detected, store the y address MBY at that time in memory (146), then calculate the center WCY (vertical center position) of the top and bottom ends (147), then set the X coordinate to WCY and move from right to left. Scan horizontally to detect the right end MRX of the pupil (Figure 5b) and store that address MRX in memory.
48) Next, scan from left to right to detect the left end MLX of the pupil (Fig. 5b), store that address MLX149), and calculate the center WCX of the left and right ends in the horizontal direction.
50), the obtained data WCX and WCY are regarded as the center of the pupil, and the process returns.

前述のステップ144で瞳の上端検出に失敗したときに
は(瞳がウィンドウ中心から左方又は右方にずれている
)、ウィンドウWeの中心を通る水平ラインを右から左
に走査して、MRX (所定数の黒の連続;第5C図)
を検出する(152)、これが検出できると、次は左か
ら右に走査してMLX (第5c図)を検出しく154
) l1lfiの右端と左端の中心WCxを演算しく1
55) 、次にx=wcxのデータを上から下に走査し
て上端MTY (第5d図)を検出しく156)、次い
で下から走査して下端MBYを検出しく157)、縦方
向の上下端の中心WCYを演算する。(158)、この
ように検出して得たデータwcx、wCYを一応瞳の中
心と見なして、リターンする。
If the detection of the upper end of the pupil fails in step 144 described above (the pupil is shifted to the left or right from the center of the window), a horizontal line passing through the center of the window We is scanned from right to left, and the MRX (predetermined Black sequence of numbers; Figure 5C)
is detected (152), and once this is detected, the next step is to scan from left to right to detect MLX (Fig. 5c) 154
) Calculate the center WCx of the right end and left end of l1lfi.
55), Next, scan the data of x = wcx from top to bottom to detect the top end MTY (Figure 5d)156), then scan from the bottom to find the bottom end MBY157), the top and bottom ends in the vertical direction. The center WCY of is calculated. (158), the data wcx and wCY thus detected are regarded as the center of the pupil, and the process returns.

ステップ144でMTYが検出できず、またステップ1
52でMRYが検出できなかったときには、ステップ1
59(第31図)に進み、ウィンドウweの左上コーナ
より右下コーナにむけて2値データを走査して(第5e
図:これはメモリ11よりの2値データの読出しスター
トアドレスをウィンドウWeの左上コーナに設定し、そ
の後順次にx、Xアドレスを同時にそれぞれm及びイン
クレメントして行う)、A点(瞳の絹布上端)を検出し
そのアドレスMRX、MTYをメモリしく159)、次
いでウィンドウWeの右下コーナより左上コーナに向け
て2値データを走査(スタートアドレスをウィンドウw
eの右下コーナとして、x、yを同時にそれぞれm及び
nデクレメクト)してB点(瞳の斜左下端)を検出して
そのアドレスMRX%MBYをメモリし、(161)、
検出したアドレスの中点wcx、wcyを演算して、(
162,163)メモリする。このように検出して得た
データWCX、WCYを一応瞳の中心と見なしてリター
ンする。
MTY could not be detected in step 144, and
If MRY cannot be detected in step 52, step 1
59 (Fig. 31), the binary data is scanned from the upper left corner to the lower right corner of the window we (step 5e).
Figure: This is done by setting the start address for reading binary data from the memory 11 to the upper left corner of the window We, and then sequentially incrementing the x and X addresses by m and each at the same time. 159), then scan the binary data from the lower right corner to the upper left corner of the window We (set the start address to the window W
As the lower right corner of e, x and y are simultaneously decremented (m and n, respectively) to detect point B (lower left corner of the pupil) and its address MRX%MBY is memorized, (161),
Calculate the midpoints wcx and wcy of the detected address, and (
162, 163) Memory. The data WCX and WCY thus detected are regarded as the center of the pupil, and the process returns.

ステップ144でMTYが検出できず、またステップ1
52でMLXが検出できず、更にステップ159でA点
が検出できなかったときには、ステップ164に進み、
ウィンドウWaの右上コーナより左下コーナに向けて2
値データを走査して(第5f図:メモリ11よりの2値
データの読出しスタートアドレスをウィンドウWeの右
上コーナに設定し、その後順次にXアドレスはmデクリ
メント、Xアドレスはnインクレメントして行う)、A
点(瞳の斜め左上端)を検出してそのアドレスMRX、
MTYをメモリしく164)、次いでウィンドウWeの
左下コーナより右上コーナにむけて2値データを走査(
スタートアドレスをウィンドウWeの左下コーナにして
、順次にXアドレスはmインクレメント、Xアドレスは
nデクリメント)してB点(瞳の絹布下端)を検出して
そのアドレスMLX、MBYをメモリしく166)、検
出したアドレスの中点WCX、WCYを演算して、(1
67,168)メモリする。このように検出して得たデ
ータWCY、WCXを一応瞳の中心と見なしてリターン
する。
MTY could not be detected in step 144, and
If MLX cannot be detected in step 52 and point A cannot be detected in step 159, the process advances to step 164.
2 from the upper right corner of window Wa toward the lower left corner
Scan the value data (Figure 5f: Read binary data from the memory 11. Set the start address at the upper right corner of the window We, then sequentially decrement the X address by m, and increment the X address by n. ), A
Detect the point (diagonally upper left corner of the pupil) and write its address MRX,
Store MTY in memory (164), then scan the binary data from the lower left corner to the upper right corner of the window We (
Set the start address to the lower left corner of the window We, sequentially increment the X address by m, decrement the , calculate the midpoints WCX and WCY of the detected addresses, and (1
67,168) memorize. The data WCY and WCX thus detected are regarded as the center of the pupil, and the process returns.

サブサブルーチン「ラインスキャンJ  (502>で
追跡した結果を(503)で判定し、追跡に成功であれ
ばメインルーチンへ戻り、失敗すれば(504)へ進み
、前々回の瞳の位置と前回の瞳の位置より、追跡に失敗
した瞳の位置を予測し、(第5g図参照)、予測位置に
ウィンドウをセットして(505)、再びサブサブルー
チン「ラインスキャンJ  (502)で瞳の位置を追
跡し、(507)の判定で、成功であればリターンし、
失敗であれば、初期位置に再びウィンドウをセットしく
50B)、三回目の「ラインスキャン」(502)を実
施する。
Sub-subroutine "Line scan J (502>) determines the result of tracking in (503). If the tracking is successful, the process returns to the main routine; if it fails, the process proceeds to (504), and the position of the pupil from the time before the previous time and the previous pupil position are determined. The position of the pupil that failed to be tracked is predicted from the position of (see Figure 5g), the window is set at the predicted position (505), and the pupil position is tracked again using the sub-subroutine ``Line Scan J'' (502). Then, if the judgment of (507) is successful, return,
If it is a failure, the window is set to the initial position again (50B) and a third "line scan" (502) is performed.

ステップ44で追跡に成功したか否かを判定し、失敗す
ればステップ12Aに戻り、成功であればステップ45
へ進む。
In step 44, it is determined whether or not the tracking was successful. If it is unsuccessful, the process returns to step 12A, and if it is successful, it is determined in step 45.
Proceed to.

目標物移動の平均値分散値の算出手段りを構成する「目
標物移動の平均値分散値の算出」サブルーチン(45)
は、本発明の最重要部分を構成するものであり、第3j
図、第3に図により詳細332明する。
``Calculation of average value variance of target object movement'' subroutine (45) constituting means for calculating average value variance value of target object movement
constitutes the most important part of the present invention, and the 3j
The details 332 will be explained in detail in FIG.

この実施例では1秒おきに300回データを収集する場
合を例示する。ステップ(510)に示すカウンタTI
MEは、フレーム同期パルスのカウンタであって、映像
が切換わる毎に0.1゜2・・・129とカウントし、
TIME=O以外の場合はステップ(510)よりステ
ップ(522)にジャンプし、(TIME+1)mod
30の処理、すなわち(TIME+1)を30で割った
剰余を、新しいTIMEとしてリターンする。
In this embodiment, a case is illustrated in which data is collected 300 times every second. Counter TI shown in step (510)
ME is a frame synchronization pulse counter, which counts 0.1°2...129 every time the video is switched.
If TIME=O, jump from step (510) to step (522) and set (TIME+1) mod
30, that is, the remainder of dividing (TIME+1) by 30 is returned as a new TIME.

換言すると、TIMEが1.2,3.・・・29のとき
はジャンプ先のステップ(522)で順次、2.3,4
.・・・29.0に変換される。TIME=29でステ
ップ(522)に入った次のパルスはしたがってTIM
E=Oとカウントされるので、カウンタTIMEはO,
l、2.・・・29゜0.1,2.・・・29を繰り返
すことになり、TIME=Oのとき、すなわちl/30
秒毎に入る信号は、30回目ずなわち1秒毎にステップ
(511)へ進むことになり、この手順によって1秒毎
に1/30秒の同期速度で入るデータは1秒毎に捕捉さ
れることとなる。
In other words, TIME is 1.2, 3. ...If it is 29, jump to the step (522), sequentially 2, 3, 4.
.. ...Converted to 29.0. The next pulse entering step (522) at TIME=29 is therefore TIM
Since E=O is counted, the counter TIME is O,
l, 2. ...29°0.1,2. ...29 will be repeated, and when TIME=O, that is, l/30
A signal that enters every second will proceed to step (511) for the 30th time, that is, every second, and by this procedure, data that enters at a synchronous speed of 1/30 second will be captured every second. The Rukoto.

1秒毎に捕捉されるデータは、ステップ511でDFL
AGがOであればステップ516へ、lであればステッ
プ512へ進む、DFLAGはステップ1の初期化でO
にセットされたままであるから、当然当初はステップ5
16へ進み、瞳の中心座標をそれぞれX (0) 、Y
 (0)と記憶し、(517)’、(518) でsU
MX、SUMY、SUMXX%SUMYYを算出し、ス
テップ521でDTP−(DTP+l)mod299の
処理を受けて、DTP= 1となってリターンする。
The data captured every second is sent to the DFL in step 511.
If AG is O, the process goes to step 516; if it is l, the process goes to step 512; DFLAG is set to O at initialization in step 1.
is still set to , so naturally step 5 is the first step.
Proceed to step 16 and set the pupil center coordinates as X (0) and Y, respectively.
(0) and (517)', (518) sU
MX, SUMY, SUMXX% SUMYY are calculated, and in step 521, they are processed by DTP-(DTP+l) mod 299, and DTP=1 and the process returns.

ここでDTPは1秒毎に捕捉されるデータの捕捉回数で
あり、0,1,2.・・・と進行する過程で、DPT=
299即ち300回目になるとステップ519で、YE
Sと判別され、ステップ520へ進んでDFLAGは1
にセットされ、ステップ゛521で(DTP+1)mo
d300の処理を受けてDTPはOにセットされてリタ
ーンする。
Here, DTP is the number of times data is captured every second, and is 0, 1, 2. In the process of progressing, DPT=
299, that is, the 300th time, in step 519, YE
It is determined that the value is S, and the process proceeds to step 520 where DFLAG is set to 1.
is set to (DTP+1)mo at step 521.
In response to the process of d300, DTP is set to O and the process returns.

ずなわちデータのt111捉回数すなわちデータ番号は
、0から出発して1秒置きに1.2,3.・・・と更新
され、299に達すると、0に復元され、引き続き0.
1,2. ・・・299を繰り返すことになり、300
回のデータの捕捉が可能となる。
That is, the number of data t111 captures, that is, the data number starts from 0 and changes to 1, 2, 3, etc. every second. ..., and when it reaches 299, it is restored to 0, and continues to be 0.
1, 2. ...299 will be repeated, and 300
It becomes possible to capture data for 10 times.

ステップ520でDTPが299 (300回目に相当
する)となると、DFLAGに1がセットされ、301
回目に相当するデータは、ステップ511からステップ
512に進み、瞳の中心データx、yはNDATAと改
名され、ステップ513.515の「平均、分散の計算
サブルーチン」で300回分のデータの平均値及び分散
値が算出される。
When the DTP reaches 299 (corresponding to the 300th time) in step 520, 1 is set in DFLAG and 301
The data corresponding to the 300 times are processed from step 511 to step 512, and the pupil center data A variance value is calculated.

平均値、分散値算出のサブサブルーチン(513)、(
515)では(第3に図参照)、最初の300回までの
データを、新しいデータが入る毎に、300回分の平均
値及び分散値を更新する手順を採用していることに注意
を要する。
Average value, variance value calculation sub-subroutine (513), (
515) (see figure 3), it should be noted that a procedure is adopted in which the average value and variance value for the first 300 times are updated every time new data is received.

尚、ステップ520(第3J図参照)で、DFLAGが
1にセットされると、メインルーチンのステップ12A
の枠の設定可能か?の判定では(第2a図参照)、設定
可能の判定により、ステップ50以降のバイパスへ進む
ことになる。従って、「瞳の追跡」サブルーチン(43
)で、追跡に失敗してステップ12Aへ戻るときには、
直ちに「中域枠の設定」サブルーチン(50)へ移行可
能となる。
Note that if DFLAG is set to 1 in step 520 (see Figure 3J), step 12A of the main routine
Is it possible to set the frame? In the determination (see FIG. 2a), it is determined that the setting is possible, and the process proceeds to the bypass from step 50 onward. Therefore, the "pupil tracking" subroutine (43
), when tracking fails and returns to step 12A,
It is possible to immediately proceed to the "setting middle range frame" subroutine (50).

この実施例では、データの捕捉間隔および捕捉回数を、
最適値として1秒および300回として例示したもので
あるが、同期速度に応じて、捕捉間隔は変更すべきであ
り、捕捉回数300回は捕捉するデータが、正規分布を
するであろうことを予測して決定したものであり、さら
に少ない捕捉回数でも正規分布が予測できるならば、回
数を減少しても措わない。
In this example, the data capture interval and number of captures are
Although the optimal values are 1 second and 300 times, the capture interval should be changed depending on the synchronization speed, and it is important to note that if the number of captures is 300 times, the captured data will have a normal distribution. This is determined based on prediction, and if a normal distribution can be predicted even with a smaller number of captures, there is no problem in reducing the number of captures.

つぎに、本発明の中域ウィンドウ設定手段Nおよび中域
ウィンドウによる目標物検出手段Pを構成するサブルー
チン「中域ウィンドウ粋の設定J  (50)及び「中
域ウィンドウによる瞳の検出J  (51)の詳細を説
明する。
Next, the subroutines ``Mid-range window ideal setting J (50)'' and ``Pupil detection using a mid-range window J (51)'' constituting the mid-range window setting means N and the target object detection means P using the mid-range window of the present invention are executed. Explain the details.

第3n図および第5h図を参照して、「中域ウィンドウ
の設定」サブルーチン(50)では、サブルーチン「瞳
の追跡J  (43)および「目標物の移動の平均値の
分散値の算出J  (45)で得た、瞳の追跡に失敗し
た時点での、最新の瞳の動きの平均値XBER%YBE
Rおよび分散値XBUNSAN、YBUNSANと瞳の
幅EWを使用してXBER,YBERを中心とし、対角
頂点の座標WXI、WYlおよびWx2、WY2をそれ
(’t’LWX1=XBER−3nτ11)l−EWW
X2=XBER+3  XBUNSAN+EWwy1=
yBER−3tF’fiゴ蒼「丁AN−EWWY2=Y
BER+3 「7「丁「丁πN+EWとする中域ウィン
ドウ枠を算出、設定する(第5h図)。
Referring to FIG. 3n and FIG. 5h, the subroutine "Setting middle range window" (50) includes the subroutine "Pupil tracking J (43)" and "Calculating the variance value of the average value of target object movement J ( 45), the average value of the latest pupil movements at the time when pupil tracking failed XBER%YBE
Using R, variance values XBUNSAN, YBUNSAN and pupil width EW, center on XBER, YBER, and set the coordinates of the diagonal vertices WXI, WYl and Wx2, WY2 as ('t'LWX1=XBER-3nτ11)l-EWW
X2=XBER+3 XBUNSAN+EWwy1=
yBER-3tF'fi Go Ao "Ding AN-EWWY2=Y
Calculate and set the midrange window frame for BER+3 "7" Ding πN+EW (Figure 5h).

■で「「1丁Wπおよびい]口JN丁X玉は夫々X方向
、Y方向の標準偏差σ)c、ayであり、3σX、3a
yを採用することにより、30法による高精度(検出に
失敗する確率の極めて少ない)のウィンドウの設定が可
能となる。
In ■, ``1 block Wπ and 1 block JN block X ball have standard deviations σ)c and ay in the X direction and Y direction, respectively, and 3σ
By employing y, it becomes possible to set a highly accurate window (with extremely low probability of detection failure) using the 30 method.

勿論3aに限定する必要はなく、更に高精度を追及する
ものであっても措わない、要は統計的に保証された高確
率ウィンドウの設定が可能であれば良い0周知のとおり
、例示の300回にわたるデータが正規分布であると仮
定すれば、30法は99.7%の確率を保証するもので
ある。
Of course, it is not necessary to limit it to 3a, and it is possible to pursue even higher accuracy.The point is that it is fine as long as it is possible to set a statistically guaranteed high probability window. Assuming that the data over 300 times is normally distributed, the 30 method guarantees a probability of 99.7%.

中域ウィンドウによる目標物検出手段Pを構成するサブ
ルーチン[中域ウィンドウによる瞳の検出J  (51
)の11が成を第3p図、第3q図、第3r図、第6a
図、第6b図に示す。
Subroutine configuring the target object detection means P using the middle range window [Pupil detection J using the middle range window (51
) 11 is completed in Figure 3p, Figure 3q, Figure 3r, Figure 6a.
6b.

このサブルーチンは更に、「瞳領域の検出」(528)
および「瞳であるかどうかの判定」(529)から構成
されているが、先に説明したサブルーチン「瞳の検出J
  (27)と類似であるので詳細説明は省略する。(
第6a図および第6b図を参照)。
This subroutine further includes “pupil region detection” (528).
and “determine whether or not the pupil is a pupil” (529).
Since it is similar to (27), detailed explanation will be omitted. (
6a and 6b).

以上で、追跡する瞳または口の意図的な運動パターンが
、所定の電気装置を1++J ta可能とする所定のパ
ターンと一致すると、その電気装置を制御する信号を発
信する制御信号判別手段Jの説明を除いて、各サブルー
チンの説明を終ったので、以下制御信号判別手段Jの説
明に入る。
The above is a description of the control signal determining means J which, when the intentional movement pattern of the eyes or mouth to be tracked matches a predetermined pattern that enables a predetermined electrical device by 1++ J ta, sends a signal to control the electrical device. Now that we have finished explaining each subroutine except for , the control signal discriminating means J will be explained below.

制御信号判別手段Jは、第2b図に示す、「瞳のまばた
きによる判定」のサブルーチン46と「瞳の移動方向に
よる判定」のサブルーチン47と、「口の動きによる判
定」のサブルーチン49とから構成されている。
The control signal discrimination means J is composed of a subroutine 46 for "judgment based on the blinking of the pupils," a subroutine 47 for "judgment based on the movement direction of the pupils," and a subroutine 49 for "judgment based on the movement of the mouth," as shown in FIG. 2b. has been done.

「瞳のまばたきによる判定」サブルーチン(46)を、
第3β図および第7a図、第7b図を参照して説明する
The “judgment based on blinking of the eyes” subroutine (46)
This will be explained with reference to FIG. 3β and FIGS. 7a and 7b.

第7b図において、通常のまばたき時間は、開眼時間が
0.2〜0.3秒、1回のまばたきの周期が1.0〜5
.0秒と一般に言われている0本発明では、無意識的な
閉眼時間と、信号発信用の意図的なまばたきを識別する
為、同図(b)に示すとおり、所定の時間TI、T2、
T3を規定し、検出する閉眼時間Tが、TI<T<T2
であれば意識的な信号発信用の閉眼であり、開眼時間T
がT>T3であれば無意識な自然の正常な開眼時間であ
り、開眼時間TがT<T3であれば意図的な開眼時間で
あると規定し、同図(C)に示すとおり、意図的な信号
用閉眼回数のフラグCTを設けて閉眼回数を算出し、C
T= 1のときはラジオのSWを操作し、CT=2のと
きはエアコンのSWを操作し、CT=3のときはヘッド
ライトを操作するものと規定する。
In Figure 7b, the normal blink time is 0.2 to 0.3 seconds for eye opening and 1.0 to 5 seconds for one blink.
.. In the present invention, in order to distinguish between involuntary eye-closing time and intentional blinking for signal transmission, the predetermined time TI, T2,
T3 is defined and the detected eye-closing time T is TI<T<T2.
If so, the eyes are intentionally closed for signal transmission, and the eye opening time T
If T > T3, it is a normal, unconscious eye-opening time, and if the eye-opening time T is T<T3, it is an intentional eye-opening time. A flag CT for the number of times of eye closure is provided for a signal to calculate the number of times of eye closure, and C
It is specified that when T=1, the radio switch is operated, when CT=2, the air conditioner switch is operated, and when CT=3, the headlights are operated.

以上の規約により、第7a図に示すとおり、「瞳のまば
たきによる判定」サブルーチン(46)では、ステップ
550.551で瞳の縦横比EH/EWを算出し、ステ
ップ552で判定値にと比較して、開眼状態であるか、
開眼状態であるかを判定する。閉眼しているときは、閉
眼時間Tを検出しく553)、閉眼時間を所定値TI、
T2と比較しく554)(556) 、T<72のとき
は居睡り運転の可能性ありとしてブザーを鳴らして警告
しく557)、さらに閉眼前の開眼時間TERMを検出
して(558)、TERM>T3のときは正常と判定し
、フラグCTを0にする。
According to the above rules, as shown in FIG. 7a, in the "judgment based on blinking of pupils" subroutine (46), the pupil aspect ratio EH/EW is calculated in steps 550 and 551, and compared with the judgment value in step 552. Are your eyes open?
Determine whether the eyes are open. When the eyes are closed, the eye-closed time T is detected (553), and the eye-closed time is set to a predetermined value TI,
554) (556), when T<72, a buzzer sounds as a warning that there is a possibility of drowsy driving557), and furthermore, detects the eye opening time TERM before closing the eyes (558), TERM> At T3, it is determined to be normal and the flag CT is set to 0.

TERM≦T3のときは、この閉眼が信号発信用の意図
的閉眼としてフラグCTをCT+ 1とする。
When TERM≦T3, this eye closure is considered as intentional eye closure for signal transmission, and the flag CT is set to CT+1.

ステップ552で、開眼状態であると判定すると、開眼
前の開眼時間TERMを検出しく562)、TERM≦
T1であれば正常運転と判定してリターンし、TERM
>Tlであれば、信号発信用の意図的閉眼と判定し、ス
テップ564でCTを検討し、 C=0のときはリターンし、 CT= 1のときはラジオのSWを操作し、CT=2の
ときはエアコンのオン/オフを操作肱 CT=3のときはヘッドライトのSWのオン/オフを操
作し、 いずれの場合もフラグCTをクリアしてリターンする。
In step 552, if it is determined that the eyes are open, the eye opening time TERM before opening the eyes is detected (562), and TERM≦
If T1, it is judged as normal operation and returns, then TERM
> Tl, it is determined that the eyes are intentionally closed for signal transmission, examines CT in step 564, returns when C=0, operates radio SW when CT=1, and sets CT=2. If , turn the air conditioner on/off; if CT=3, turn the headlight switch on/off; in either case, clear the flag CT and return.

次に「瞳の移動方向による判定」サブルーチン(47)
について、第3m図および第7c図を参照説明する。こ
の制御信号判別手段Jは、ドライバが制御を希望する電
気装置のコントローラ部に注目したとき、その瞳の移動
ベクトルを、所望するコントローラ部の所定のベクトル
と一致させる必要があり、各コントローラ部の配置は、
適切な位置に設定される。この実施例では、第7e図(
C)に示すとおり、ラジオ、エヤコン、その他の装置の
コントロール部の位置が、ドライバの正常の瞳中心から
夫々上下方向に−Y1、+Y2、Y3、左右方向&、m
−XI、+X2、−X 3 G、:設定されており、サ
ブルーチン47では、ステップ570.571で瞳の初
期位置からのずれX、Yを検出し、ステップ572,5
73,574,575を経て、エヤコン、ラジオ、Al
l器、8機器、C機器を制御する。
Next, the “judgment based on the direction of pupil movement” subroutine (47)
This will be explained with reference to FIG. 3m and FIG. 7c. This control signal discriminating means J needs to match the movement vector of the pupil with a predetermined vector of the desired controller when the driver focuses on the controller of the electrical device that he/she desires to control. The arrangement is
set in the appropriate position. In this example, FIG. 7e (
As shown in C), the positions of the controls for radios, air conditioners, and other devices are -Y1, +Y2, Y3 in the vertical direction and horizontally & m from the center of the driver's normal pupils, respectively.
-XI, +X2, -X3G: are set, and in subroutine 47, the deviations X and Y from the initial position of the pupil are detected in steps 570 and 571, and the deviations X and Y from the initial position of the pupil are detected in steps 572 and 5.
After 73,574,575, air conditioner, radio, aluminum
Controls 1 device, 8 devices, and C device.

瞳のまばたきによる判定手段によれば、本発明の制御装
置は、本来の目的以外に、居睡り運転防止装置として極
めて有効に利用できるものでありさらに瞳の移動方向の
ベクトルの成分が、所定の移動mを超える回数をカウン
トすることにより、危険な脇見運転を防止する装置とし
て有効に利用できることも容易に了解できるであろう。
According to the determination means based on the blinking of the pupils, the control device of the present invention can be used extremely effectively as a drowsy driving prevention device in addition to its original purpose. It will be easily understood that by counting the number of times the number of movements exceeds m, it can be effectively used as a device for preventing dangerous distracted driving.

「口の動きによる判定」サブルーチン(49)は、本発
明で、極めて広範な制御信号判別手段Jを実現するもの
であり、第3s図、第3を図、第3u図及び第8a図、
第8b図を参照して実施例を詳細に説明する。
The "judgment based on mouth movement" subroutine (49) realizes an extremely wide range of control signal discrimination means J in the present invention, and is shown in Fig. 3s, Fig. 3, Fig. 3u, Fig. 8a,
The embodiment will be described in detail with reference to FIG. 8b.

第3s図において、マイクロプロセッサ6は、まず口の
追跡(48)で更新設定したウィンドウWmの2値デー
タをメモリ11から読出してマイクロプロセッサ8に与
え、口の横幅MWと口の縦幅MH(第8a図)を検出す
る(207〜212)、マイクロプロセッサ8は、ウィ
ンドウWmの2値データを受けると、まずライン方向を
縦(y)に設定して、第1ラインをウィンドウWmの左
端に定めて、ラインを左方から右方に更新して、ライン
更新毎にランカウンタをクリアしかつ白データを読み出
ずとランカウンタをクリアして、各ラインにおいて黒画
素の連続数(黒ランレングス)をカウントする。黒ラン
レングスが所定値以上になるとそこ(ラインのXアドレ
ス)が口の右端であるとしてそのときのXアドレスNM
RXをメモリーする(207)、次にラインアドレスを
ウィンドウWmの右端に定めて、同様にラインアドレス
を左方に更新し、各縦ライン上の黒ランレングスをカウ
ントして、カウント値が所定値以上になるとそこが口の
左端であるとしてそのときのXアドレスNMLXをメモ
リして(208)、口(7)横幅MW=NMLX−NM
RXを演算しメモリする(209)。
In FIG. 3s, the microprocessor 6 first reads the binary data of the window Wm updated and set in the mouth tracking (48) from the memory 11 and gives it to the microprocessor 8. When the microprocessor 8 receives the binary data of the window Wm, it first sets the line direction to vertical (y) and aligns the first line with the left end of the window Wm. The number of consecutive black pixels (black run count). When the black run length exceeds a predetermined value, it is assumed that that point (X address of the line) is the right edge of the mouth, and the X address NM at that time is determined.
RX is memorized (207), then the line address is set at the right end of the window Wm, the line address is similarly updated to the left, the black run length on each vertical line is counted, and the count value is a predetermined value. If it is above, it is assumed that this is the left end of the mouth, and the X address NMLX at that time is memorized (208), and the mouth (7) width MW = NMLX - NM
RX is calculated and stored in memory (209).

次に、XアドレスをNMRX+ (NMLX−NMRX
)/2 (口の横方向中央)に設定して、そのXアドレ
スの縦ラインの2値画像データをウィンドウWmの上端
から下端に向けて読んでデータが白のときにはランカウ
ンタをクリアし、黒のときにはランカウンタを1カウン
トアツプして、カウント値すなわち黒ランレングスが所
定数以上になると唇の上端を検出したとして、そのとき
のyアドレスNMTYをメモリしく210゜211)、
次にウィンドウWmの下端から2値画像データを読んで
、黒ランレングスをカウントしてカウント値が所定数以
上になると唇の下端を検出したとしてその時のyアドレ
スNMBYをメモリしく210,211)、次に縦幅M
H=NMBY−NMTYを演算してメモリして、 MW、MH,NMRX+ (NMLX−NMRX)/2
およびNMTY+ (NMBY−NMTY)/2をマイ
クロプロセッサ6に転送する。マイクロプロセッサ6は
、 NMRX+ (NMLX−NMRX)/2およびNMT
Y+ (NMBY−NMTY)/2 (これらはウィン
ドウWmの中の口中心座標である)をフレーム位置座標
に変換してこれをMCX、MCYとして更新メモリする
とともに、ウィンドウWmをこのMCX%MCYを中心
とするものに更新設定する。そして、MWをWl (所
定の判別値)と、MHを予め記憶している判別値H1、
H2、H3、およびH4と比較して、口の形状が「ア」
発音形状であるか、「イ」発音形状であるか、「つ」発
音形状であるか、「工」発音形状であるか、あるいは「
オ」発音形状であるかを判定し(213〜217)、「
ア」であると「ア」を示すデータを、「イ」であると「
イ」を示すデータを、「つ」であると「つ」を示すデー
タを、「工」であると「工」を示すデータを、また「才
」であると「オ」を示すデータをレジスタIにセットす
る(218〜222)。
Next, set the X address to NMRX+ (NMLX-NMRX
)/2 (horizontal center of the mouth), read the binary image data of the vertical line at that X address from the top to the bottom of window Wm, and when the data is white, clear the run counter, and At this time, the run counter is incremented by 1, and when the count value, that is, the black run length becomes more than a predetermined number, the upper end of the lips is detected, and the y address NMTY at that time is memorized.210°211)
Next, the binary image data is read from the lower end of the window Wm, the black run length is counted, and when the count value exceeds a predetermined number, the lower end of the lips is detected and the y address NMBY at that time is stored in memory (210, 211). Next, the vertical width M
Calculate H=NMBY-NMTY and store it in memory, MW, MH, NMRX+ (NMLX-NMRX)/2
and NMTY+ (NMBY-NMTY)/2 are transferred to the microprocessor 6. Microprocessor 6 has NMRX+ (NMLX-NMRX)/2 and NMT
Convert Y+ (NMBY-NMTY)/2 (these are the mouth center coordinates in window Wm) to frame position coordinates, update the memory as MCX and MCY, and center window Wm at this MCX%MCY. Update settings to what you want. Then, MW is defined as Wl (predetermined discriminant value), MH is pre-stored discriminant value H1,
Compared to H2, H3, and H4, the mouth shape is “A”.
whether it is the pronunciation shape, the "i" pronunciation shape, the "tsu" pronunciation shape, the "tech" pronunciation shape, or the "i" pronunciation shape.
It is determined whether the pronunciation shape is “o” (213 to 217), and “
If it is “A”, the data that indicates “A” is “A”, and if it is “I”, it is “
Register the data indicating ``a'', the data indicating ``tsu'' when ``tsu'', the data indicating ``tech'' when ``tech'', and the data indicating ``o'' when ``sai''. Set to I (218-222).

第8b図に示すように、母音「ア」〜「才」はそれぞれ
他と区別できる横幅および縦幅であるので、前述のWl
、H1〜H4等の参照値とMW、M Hとの比較により
、これらの母音を特定できる。
As shown in Figure 8b, the vowels ``a'' to ``sai'' have widths and heights that can be distinguished from each other, so the above-mentioned Wl
, H1 to H4, etc., and MW, MH. These vowels can be identified by comparing them with reference values such as MW and MH.

ここで以下の、口の発声形状パターン変化判定の説明の
ために、第1a図に示す電気装置20〜29に割り付け
られている呼び方を示すと次の第1表の通りである。
Here, for the purpose of explaining the determination of changes in the speech shape pattern of the mouth below, the names assigned to the electrical devices 20 to 29 shown in FIG. 1a are shown in Table 1 below.

(上人下 イ5已、自ン 第1表 ラジオの付勢制御を例にあげると、この実施例では、「
ラジオ」 「動け」と発声し、その母音だけを選択する
と「アイオ」 「つオニ」ということになる、これらの
母音発声形状を検出してレジスタ1.2.3に順次にメ
モリして、母音形状を検出する毎に(第3S図の213
〜222)まず検出データ(検出母音を示すデータ)を
レジスタIに格納し、レジスタ■の内容をレジスタ3の
内容と比較しく223)、両者が合致すると、同じ母音
形状が継続していることになるので、そのまま何もしな
いでリターンし、異なっていると発声形状が変化したこ
とになるので、レジスタ2の内容をレジスタlに、レジ
スタ3の内容をレジスタ2に移してレジスタ3にレジス
タIの内容をメモリする(224)。
(Taking the example of energization control of the first radio on the 5th page of Jonin, in this embodiment,
``Radio'' If you say ``Move'' and select just that vowel, it will become ``I-o'' and ``Tsu-oni.'' These vowel pronunciation shapes are detected and sequentially stored in registers 1.2.3, and the vowel is selected. Each time a shape is detected (213 in Figure 3S)
~222) First, store the detected data (data indicating the detected vowel) in register I, and compare the contents of register ■ with the contents of register 3.223) If the two match, it means that the same vowel shape continues. Therefore, return without doing anything, and if it is different, the utterance shape has changed, so move the contents of register 2 to register L, the contents of register 3 to register 2, and transfer the contents of register I to register 3. The contents are stored in memory (224).

すなわち直前に検出している母音形状とは異なる最新の
母音発声形状の検出データをレジスタ3にメモリする。
That is, the detection data of the latest vowel pronunciation shape different from the vowel shape detected immediately before is stored in the register 3.

このようなメモリシフトにより、まず「ラジオ」という
形に口形状が動いたとき、最後の「才」形状を検出した
ときのレジスタ1〜3の内容は、上記表中にケイ線でか
こんだ母音データが格納されていることになる。何時の
時点に、母音の発声形状検出データをレジスタ1〜3に
格納完了しているか不明であるので、母音検出データを
レジスタ3に格納する毎に、ステップ225〜227で
、レジスタ表中の電気装置又は動作命令対応の母音発声
形状データを、レジスタ1〜3に格納しているか否かを
判定する。これはレジスタ1〜3の内容、すなわち発声
形状の時系列パターン、が前記衣に示す内容のいずれに
なっているかをチエツクすることである。
As a result of this memory shift, when the mouth shape first moves to the shape of "radio," and when the last shape of "sai" is detected, the contents of registers 1 to 3 are the vowels enclosed by the lines in the table above. The data will be stored. Since it is unknown at what point the vowel voicing shape detection data has been stored in registers 1 to 3, each time the vowel detection data is stored in register 3, in steps 225 to 227, the It is determined whether vowel pronunciation shape data corresponding to the device or action command is stored in registers 1 to 3. This is to check whether the contents of registers 1 to 3, that is, the time-series pattern of the utterance shape, are the contents shown in the above-mentioned clothes.

いずれかになっていると、例えばラジオ欄の通りに、レ
ジスタ3に「才」データが、レジスタ2に「イ」データ
が、またレジスタlに「アコデータが格納されていると
、ステップ225−2と進んで、NAMEレジスタに「
ラジオ」を示すデータをセットする(266)。
If one of these is selected, for example, as shown in the radio field, register 3 stores "Sai" data, register 2 stores "i" data, and register L stores "aco data," then step 225-2 and enter " in the NAME register.
"Radio" is set (266).

レジスタ1〜3の内容が前記表中のI”0NJlr4に
示すデータになっているとステップ225−234−2
43−253−254−255を経て、動作レジスタに
「ON」をセットする(257)、そして動作レジスタ
に動作命令データ(ON、OFF、UP、DOWN)を
格納したとき(242,250,257,259)には
、レジスタ1〜3をクリアし、出力レジスタのデータを
、例えばラジオコントローラ20(これはNAMEレジ
スタの内容で定まる)を指示するものに更新して、イン
ターフェイス14に出力レジスタの内容を出力する。
If the contents of registers 1 to 3 are the data shown in I"0NJlr4 in the table above, step 225-234-2
43-253-254-255, set "ON" in the operation register (257), and store operation command data (ON, OFF, UP, DOWN) in the operation register (242, 250, 257, 259), clears registers 1 to 3, updates the data in the output register to one that instructs, for example, the radio controller 20 (this is determined by the contents of the NAME register), and sends the contents of the output register to the interface 14. Output.

ドライバの動作と、上述の実施例の動作を要約すると次
の通りである。
The operation of the driver and the operation of the above embodiment are summarized as follows.

(1)スイッチ5Eおよび5Mがともに開の状態で、ド
ライバがスイッチ5Eまたは5Mのいづれかを閉にする
と、照明灯4を標準デユーティで点灯付勢し、カメラ3
をオンにする。そして、所要の遅延時間の後にドライバ
の顔の画像データを1フレ一ム分メモリ13に読み込み
、照度ヒストグラムを作成してそれを設定値と比較して
照度の適否を判定して、照明灯の明るさを調整する。照
明灯の明るさを変更する毎に新たに1フレームの画像デ
ータをメモリ13に読込む(2〜12)。
(1) When the driver closes either switch 5E or 5M while both switches 5E and 5M are open, the illumination light 4 is energized with the standard duty, and the camera 3
Turn on. Then, after the required delay time, one frame of image data of the driver's face is read into the memory 13, an illuminance histogram is created, and it is compared with the set value to determine whether the illumination is appropriate or not, and the illuminance is adjusted accordingly. Adjust brightness. Each time the brightness of the illumination lamp is changed, one frame of image data is newly read into the memory 13 (2 to 12).

(2)明るさ調整を終ると、中域ウィンドウ枠を設定で
きるか否かを検定するステップ12AでDFLAGがO
であれば(13)へ、lであれば(48)へ分岐する。
(2) After completing the brightness adjustment, in step 12A to test whether the midrange window frame can be set, DFLAG is
If so, branch to (13); if l, branch to (48).

電源オン(1)の直後では、DFLAG=Oに初期化さ
れているから、(13)へ進む。
Immediately after the power is turned on (1), DFLAG is initialized to O, so proceed to (13).

(3)ステップ13で、メモリ13に凹込んでいるlフ
レーム分の画像データの所定領域Htpの単純階調ヒス
トグラムを演算して、背景から頭髪を切り出すしきい値
THhを決定しく13)、該しきい値で画像データを2
値化して頭部右端位置ARX、左端位置ALXおよび先
端位置ATVを検出する(15) 。
(3) In step 13, a simple gradation histogram of a predetermined area Htp of l frames of image data stored in the memory 13 is calculated to determine a threshold value THh for cutting out hair from the background. 2 image data with threshold
The head right end position ARX, left end position ALX, and tip position ATV are detected by converting into values (15).

頭部左右端位置の間であって、先端位置ATYより下方
の領領域を左右に2等分し、各領域で単純階調ヒストグ
ラムに基づいてしきい値THfr(右半分)およびT 
Hf Lを決定し、該領領域を横方向に、右側から領域
1、領域2および領域3(第4c図)と3等分して、領
域lにTHfrを、領域2にはTHfrとT Hf L
の内大きい方を、領域3にはT Hf Lを、決定しく
20)、これらで領領域(領域1〜3)の画像データを
2値化して、額上端(額と頭髪の境界)の位置HT Y
および左右端HLX、HRXを検出しく22)、前幅H
W = HL X −HRXを算出する。
The area between the left and right end positions of the head and below the tip position ATY is divided into left and right halves, and thresholds THfr (right half) and T are set in each area based on a simple gradation histogram.
Determine Hf L, divide the area horizontally into three equal parts from the right side, area 1, area 2, and area 3 (Fig. 4c), and divide THfr into area l, and THfr and THf into area 2. L
, T Hf L for region 3, and definitely 20). Binarize the image data of the region (regions 1 to 3) with these to determine the position of the upper end of the forehead (boundary between forehead and hair). HT Y
and left and right ends HLX, HRX22), front width H
Calculate W = HLX - HRX.

額上端HT Yの前幅HWの右半分×下方向HWの領域
Sd(第4d図)で差分階調ヒストグラムに基づいて瞳
検出用しきい値THeを決定して(サブルーチン25)
、領域Sdの階調データを2値化し、右目領域E(第4
f図)を検出しく27)、瞳の中心位置を検出して(3
3)、該中心位置を中心とする小領域のウィンドウWe
を定める。
The threshold value THe for pupil detection is determined based on the differential tone histogram in the area Sd (Figure 4d) of the right half of the front width HW of the upper edge of the forehead HT Y x the lower direction HW (subroutine 25).
, the gradation data of the area Sd is binarized, and the right eye area E (fourth
Figure f) is detected27), the center position of the pupil is detected (3
3), a small area window We centered on the center position
Establish.

領領域より両眉毛の外端を検出して(35)、口検出領
域を定めて口検出領域のしきい値THmを、差分階調ヒ
ストグラムに基づいて定め(36)、口の中心位置を検
出して(37,38)、口中心位置を中心とする小領域
のウィンドウWmを定める。
The outer ends of both eyebrows are detected from the area (35), a mouth detection area is determined, and the threshold value THm of the mouth detection area is determined based on the difference tone histogram (36), and the center position of the mouth is detected. (37, 38), a window Wm of a small area centered on the mouth center position is determined.

ここまでの処理で、追跡しようとする瞳の現在の位置及
び追跡用ウィンドウWeの大きさと、追跡しようとする
口の中心位置および口追跡用ウィンドウWeの大きさが
決定できて初期段階を終了し、ステップ12Aで分岐し
たバイパスと合流する。この初期段階は複雑で時間を要
するので、本発明は、ステップ45で目標物の移動平均
値および分散II′1が算出されるとこの初期段階をバ
イパスすることにより、画像処理の高速化を実現する。
With the processing up to this point, the current position of the pupil to be tracked, the size of the tracking window We, the center position of the mouth to be tracked, and the size of the mouth tracking window We can be determined, and the initial stage is completed. , merges with the bypass branched off at step 12A. Since this initial stage is complex and time-consuming, the present invention achieves faster image processing by bypassing this initial stage once the moving average value and variance II'1 of the target are calculated in step 45. do.

(4)初期段階を終ると、新たに画像読取りを行う毎に
(40)、上記しきい値THe (We領領域、THm
 (Wm領域)で画像各部を2値化し、ウィンドウW 
e 、W mの領域で瞳検出または口検出を行う、検出
に失敗すると前記初期段階へ戻り、検出に成功すると、
(45)で目標物の移動のデータの収集処理を開始する
(4) After the initial stage, each time a new image is read (40), the threshold value THe (We area, THm
(Wm area) to binarize each part of the image and window W
Eye detection or mouth detection is performed in the area of e and W m. If detection fails, the process returns to the initial stage, and if detection is successful,
At (45), the process of collecting data on the movement of the target object is started.

(5)「平均値および分散値の算出」ルーチン(45)
は、瞳又は口の追跡走査の過程で、1秒毎に測定した瞳
又は口の移動データを300回集積し、この300回分
のデータの平均値および分散値を算出し、さらにその平
均値および分散値を、新データの入力の都度逐次更新記
憶することによって、バイパス回路のステップ50で使
用する中域ウィンドウ設定データを用意する。また最初
に300回のデータが集積され、最初の平均値、分散値
が決まると、DFLAGに1をセットし、ステップ12
Aで、バイパス回路へ移行可能な状態とする。
(5) “Calculation of mean and variance” routine (45)
In the process of pupil or mouth tracking scanning, pupil or mouth movement data measured every second is accumulated 300 times, the average value and variance value of the data for these 300 times are calculated, and the average value and the variance value are calculated. Mid-range window setting data used in step 50 of the bypass circuit is prepared by sequentially updating and storing the dispersion value each time new data is input. In addition, when the first 300 data are accumulated and the initial average value and variance value are determined, DFLAG is set to 1, and step 12
At A, it is possible to shift to the bypass circuit.

(6)ステップ45を終ると、モードスイッチ5Eが閏
であるときには、瞳のまばたきによる判定(46)、お
よび瞳の移動方向による判定(47)を行い、モードス
イッチ5Mが閉であるときは、口の動きによる判定を行
って、終了後新しい画像を取り込んで追跡を続行する。
(6) After completing step 45, when the mode switch 5E is in the leap mode, determination based on the blinking of the pupil (46) and determination based on the moving direction of the pupil (47) are performed, and when the mode switch 5M is closed, It makes judgments based on mouth movements, and then captures new images and continues tracking.

(7)ステップ43で瞳を追跡する過程で、追跡に失敗
するとステップ12Aにもどるが、DFLΔG=1の場
合には、バイパス回路に進み、追跡成功の確度の高い最
新の中域ウィンドウを設定しく50)、このウィンドウ
を走査して見失った瞳または口を発見して、再び画像デ
ータを取り込んで追跡を再開する。
(7) In the process of tracking the pupil in step 43, if tracking fails, the process returns to step 12A, but if DFLΔG=1, proceed to the bypass circuit and set the latest mid-range window with a high probability of successful tracking. 50), scan this window to find the lost eye or mouth, capture image data again, and restart tracking.

上記実施例は、車上搭載電気装置をドライバの顔の瞳及
び口の意図的な動きに応答して制御を行う車上制御装置
についての実施例であるが、本発明の作用効果は、撮像
対象がドライバでない場合にも同様にもたらされる0例
えば病院の重症患者が、目と口で周囲の医療(浅型や救
援1幾器を動作させたり、停止させたり、あるいはパワ
ーアップ/ダウンをさせたりできる。
The above embodiment is an example of an on-vehicle control device that controls an on-vehicle electrical device in response to intentional movements of the eyes and mouth of the driver's face. The same effect occurs even when the target is not the driver. For example, a critically ill patient at a hospital can use his or her eyes and mouth to activate or stop nearby medical equipment (shallow type or rescue equipment), or power up/down. You can

更に機械の異常監視及び保護装置として、描像装置の撮
影対象を機械とし、目標物を異常監視すべき部品又は部
位とし、それが異常な動きをするとその磯城を停止する
なり、警報装置を動作させるなど、対象は人ではなくて
も本発明は同様に実施し同様な効果を得ることができる
Furthermore, as an abnormality monitoring and protection device for machinery, the object to be photographed by the imaging device is the machine, the target object is the part or part to be monitored for abnormality, and if the object moves abnormally, the Isochiro is stopped and an alarm device is activated. Even if the target is not a person, the present invention can be implemented in the same manner and similar effects can be obtained.

更に、監視対象を、広い場所(自然の背景)とし、特定
の目標物をその場所の動物又は車等の移動体とする形で
も本発明は同様に実施できる。例えばサファリバークに
おける卓の移動に応じたゲートの開閉制御や、猛獣の移
動に応じたゲート制御に同様に実施できる。これを工場
に置換えると、例えばベルトコンベアラインを撮像対象
とし、目標物をコンベア上の部品又は製品として、それ
が所定方向に動くと、安全装置を働かせるとか、次工程
の機器を動作させるとか、上述の場合と同様に上記装置
を実施して同様な効果が得られる。
Furthermore, the present invention can be implemented in the same manner in which the monitoring target is a wide place (natural background) and the specific target is an animal in the place or a moving body such as a car. For example, it can be similarly implemented to control the opening and closing of a gate according to the movement of a table in a safari bark, or to control the gate according to the movement of a wild beast. Translating this to a factory, for example, if a belt conveyor line is to be imaged, and the target object is a part or product on the conveyor, when it moves in a predetermined direction, a safety device is activated or equipment for the next process is activated. , similar effects can be obtained by implementing the above device in the same manner as in the case described above.

[発明の効果] 本発明は、実施例で詳細説明のとおり、目標追跡手段に
よって目標物を追跡走査する過程で、所定時間毎に目標
物の移動データを所定回数集積し、該所定回数分のデー
タの平均値および分散値を算出し、更に当該平均値およ
び分散値を、新データの入力の都度逐次変更記憶するこ
とにより、目標物の追跡に失敗すると、この記憶した平
均値及び分散値を使用した目標物捕捉確率の高い高精度
中域ウィンドウを設定し、そのウィンドウで見失った目
標物を再発見の上、狭域ウィンドウで目標物を追跡する
。従って、 (1)目標物の時系列的状態変化を追跡するウィンドウ
を狭域に設定することにより、目標物の追跡時間を短縮
し、 (2)追跡に失敗する場合には、バイパス経路により、
最新の平均値及び分散値を使用した、高速高精度の中域
ウィンドウの設定により目標物の再検出、再追跡を可能
とし、 装置全体の目標物追跡速度を大きく向上させ、リアルタ
イムによる走査を可能とする。
[Effects of the Invention] As described in detail in the embodiments, the present invention accumulates movement data of the target a predetermined number of times at predetermined time intervals in the process of tracking and scanning the target object by the target tracking means, and collects movement data of the target object for the predetermined number of times. By calculating the average value and variance value of the data, and then changing and storing the average value and variance value sequentially each time new data is input, if the target object tracking fails, the stored average value and variance value are A high-precision mid-range window with a high probability of target capture is set, the lost target is rediscovered using that window, and then the target is tracked using a narrow window. Therefore, (1) By setting a narrow window for tracking time-series changes in the state of the target, the time required to track the target is shortened. (2) If tracking fails, a bypass path is used to
By setting a high-speed, high-precision mid-range window using the latest average and variance values, it is possible to re-detect and re-track the target, greatly improving the target tracking speed of the entire device and enabling real-time scanning. shall be.

また本発明は、目標物が車上トライバの瞳または口であ
って、ドライバの意図的な瞳または口の動きを制御信号
判定手段で判別することにより、車上搭載電気装置を付
勢制御可能とする。
Furthermore, the present invention is capable of controlling the energization of the on-vehicle electric device by determining the intentional movement of the driver's eyes or mouth using the control signal determination means when the target object is the eyes or mouth of the on-vehicle driver. shall be.

また本発明は、目標物が重症患者の瞳または口であって
、重症患者の意図的な瞳または口の動きを制御信号判定
手段で判別することにより、医療機器または救援機器の
電気装置を付勢制御する重症患者の支援装置として使用
できる。
Further, the present invention provides an electric device for medical equipment or rescue equipment by determining the intentional movement of the eyes or mouth of a seriously ill patient by using a control signal determining means, when the target object is the eyes or mouth of a critically ill patient. It can be used as a support device for critically ill patients to control their symptoms.

さらにまた、本発明は、特別の付属設備を設けることな
しに、ドライバの瞳のまばたき間隔により、制御信号判
定手段で居眠り運転を検知し、U報を発信するドライバ
の居眠り運転防止装置として使用できる。
Furthermore, the present invention can be used as a driver's drowsy driving prevention device that detects drowsy driving using a control signal determining means based on the blink interval of the driver's eyes without providing any special accessory equipment, and sends a U-warning. .

さらにまた、本発明の要部は、ソフトウェアのみで構成
されているので、設計の自由度、柔軟性が大であり、目
標物の個別特性に対応した装置の設計が容易となり、例
えば身体障書者専用車輛に好適に使用できる。
Furthermore, since the main part of the present invention is composed only of software, there is a large degree of freedom and flexibility in design, and it is easy to design a device that corresponds to the individual characteristics of the target. It can be suitably used in private vehicles.

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

第1a図は、本発明の一実施例の構成を示すブロックダ
イヤグラム、第1b図は第1a図に示すテレビカメラ3
および照明灯4の配置外観を示す斜視図である。 第2a図、第2b図は、本発明の概要を示すフローチャ
ートである。 第3a図〜第3u図は第2a図、第2b図に示すメイン
フローを構成する各サブフローチャート(サブルーチン
)である。 第3a図は画像境界検出手段E(頭部境界)のフローチ
ャート 第3b図は目標物検出手段G(頭部検出)のフローチャ
ート 第3c図は画像境界検出手段E(額部境界)のフローチ
ャート 第3d図は目標物検出手段G(額部検出)のフローチャ
ート 第3e図は画像境界検出手段E(瞳周りの境界)のフロ
ーチャート 第3f図は目標物検出手段G(瞳の検出)のフローチャ
ート 第3g図はしきい値変更(顔面)のフローチャート 第3h図および第31図は目標物追跡手段■(瞳の追跡
)のフローチャート 第3J図および第3に図は目標物の移動の平均値、分散
値の算出手段りのフローチャート第31図は制御信号判
別手段Jを構成する瞳のまばたきによる判別手段のフロ
ーチャート第3m図は制御信号判別手段Jを構成する瞳
の移動方向よる判別手段のフローチャート第3n図は中
域ウィンドウ設定手段Nのフローチャート 第3p図、第3q図および第3r図は中域ウィンドウに
よる目標物検出手段Pのフローチャート第3s図、第3
を図および第3u図は制御信号判別手段J(口の動きに
よる判定手段)のフローチャートである。 第4a図、第4b図、第4c図、第4d図、第4e図、
第4f図、第4g図、第4h図、第41図、第4j図は
、カメラ3で撮像した画像の全体または一部を示す平面
図である。 第5a図、第5b図、第5C図、第5d図、第5e図、
第5f図および第5g図は、瞳追跡のために設定したウ
ィンドウの領域と検出した瞳を示す平面図及び瞳位置の
線形予測図、第5h図は中域ウィンドウの設定要領図で
ある。 第6a図および第6b図は中域ウィンドウによる瞳の検
出要領図である。 第7a図は瞳のまばたき検定の要領図、第7b図は、意
図的まばたき検出の要領図、第7C図は、瞳の移動方向
と電気装置との関連を規定する図面。 第8a図は口追跡のため設定したウィンドウWmの領域
と検出した口を示す平面図である。第8b図は母音発声
時の口形状を示す平面図である。 第9a図は従来技術による装置の構成図を示し、第9b
図は本発明による装置の構成図な示す。 A00画像入力手段 3、テレビカメラ 18、A/Dコンバータ B、照明手段 4、照明灯 C1目標物選定手段 5E、5M  モード指示スイッチ D0画像制御記憶手段 6、汎用マイクロプロセッサ 7、アドレス バス および コントロール バス 8、画像用プロセッサ 11.12.画像フレーム メモリ E6画像境界検出手段 F、広域ウィンドウ設定手段 G、広域ウィンドウによる目標物検出手段H1狭域ウィ
ンドウ設定手段 ■、広域ウィンドウによる。目標物追跡手段J、制御信
号判別手段 に、電気装置制御手段 19.20〜30.コントローラ L、目標物の移動の平均値分散値算出手段M、中中域ィ
ンドウ設定可能判定手段 W6.Wm1ウインドウ 特許出願人 アイシン精機株式会社 他1名 寥1d 図面の浄書(内容に変更なし) 図面の浄書(内容に変更なし) 図面の浄IF(内容に変更なし) 多3rr−Iぼ 図面の浄書(内容に変更なし) 声4e区 ÷3d ■ 克49図 第4h図 間Cス 】五鼾【 東4b図 東5a図 」(市」L (o−)と下方耐の鱈の銹和六分 Cb)左后ヤ同の呂老n朽りフ1分 に〕木芝趣=シF−0−・しiで・廓[翌辷・会麦才q
b 図 Cユ)慮ヰ0ず2二唾同 (E〕〕少プヒツ江ji?百Tl、T2.T3 k;S
ン1言よ帥嬉σすAづ耐出ζΣ言I9そ1hiI眞〕 (こつ 7iり“ご丁C3わ立id、irr?−1n才
針血手続補正書(麗) 24日 7、補正の内容 (1)  明細書第95頁第9行乃至第96頁第20行
「第3a図〜第3u図は・・・・・・・・・チャートで
ある。」とあ肩占賎を、下記の通り補正する。
FIG. 1a is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 1b is a television camera 3 shown in FIG. 1a.
FIG. 4 is a perspective view showing the appearance of the arrangement of illuminating lights 4. FIG. Figures 2a and 2b are flowcharts outlining the present invention. FIGS. 3a to 3u are sub-flow charts (subroutines) constituting the main flow shown in FIGS. 2a and 2b. Figure 3a is a flowchart of the image boundary detection means E (head boundary). Figure 3b is a flowchart of the target object detection means G (head detection). Figure 3c is a flowchart of the image boundary detection means E (forehead boundary). Figure 3d is a flowchart of the image boundary detection means E (forehead boundary). Figure 3e is a flowchart of the target object detection means G (forehead detection). Figure 3e is a flowchart of the image boundary detection means E (border around the pupil). Figure 3f is a flowchart of the target object detection means G (pupil detection). Figure 3g. Figures 3H and 31 are flowcharts for changing the threshold value (face) and Figures 3J and 3J are flowcharts for the target object tracking means (pupil tracking), respectively. FIG. 31 is a flowchart of the determination means based on the blinking of the pupils, which constitutes the control signal determination means J. FIG. 3M is a flowchart of the determination means based on the movement direction of the pupils, which constitutes the control signal determination means J. Figures 3p, 3q and 3r are flowcharts of the middle range window setting means N, and Figures 3s and 3 are flowcharts of the target object detection means P using the middle range window.
1 and 3U are flowcharts of the control signal determining means J (determining means based on mouth movements). Figures 4a, 4b, 4c, 4d, 4e,
4f, 4g, 4h, 41, and 4j are plan views showing the whole or part of the image taken by the camera 3. FIG. Figure 5a, Figure 5b, Figure 5C, Figure 5d, Figure 5e,
FIGS. 5f and 5g are a plan view showing the area of the window set for pupil tracking and the detected pupils, and a linear prediction diagram of the pupil position, and FIG. 5h is a diagram showing how to set the mid-range window. FIGS. 6a and 6b are diagrams showing how to detect the pupil using the mid-range window. Fig. 7a is a diagram showing the procedure for testing pupil blinking, Fig. 7b is a diagram showing the procedure for detecting intentional blinking, and Fig. 7C is a diagram defining the relationship between the direction of movement of the pupil and the electric device. FIG. 8a is a plan view showing the region of the window Wm set for mouth tracking and the detected mouth. FIG. 8b is a plan view showing the shape of the mouth when pronouncing vowels. FIG. 9a shows a configuration diagram of a device according to the prior art, and FIG.
The figure shows a block diagram of a device according to the invention. A00 image input means 3, television camera 18, A/D converter B, illumination means 4, illumination light C1 target selection means 5E, 5M mode instruction switch D0 image control storage means 6, general-purpose microprocessor 7, address bus and control bus 8. Image processor 11.12. Image frame Memory E6 Image boundary detection means F, wide area window setting means G, target object detection means using wide area window H1 Narrow area window setting means ■, using wide area window. The target tracking means J, the control signal discrimination means, and the electric device control means 19.20 to 30. Controller L, mean value variance value calculation means M for movement of a target, means W6 for determining whether a middle-mid range window can be set. Wm1 window patent applicant Aisin Seiki Co., Ltd. and 1 other person 1d Engraving of drawings (no change in content) Engraving of drawings (no change in content) Engraving of drawings IF (no change in content) Engraving of multi-3rr-I drawings (No change in content) Voice 4e ku ÷ 3d ■ Katsu 49 Figure 4h Figure Interval C] Five snoring [East 4b Figure East 5a Figure ``(city'' L (o-) and downward resistance of cod showa 6 minutes Cb) Zuoya same Lu old n rotten fu 1 minute] Kishiba taste=shiF-0-・shii de・廓 [next ship・kaimuzaiq
b Figure C Yu) Consider ヰ0zu 2 2 saliva same (E)〕Sho Puhitsu Ji? 100Tl, T2.T3 k;S
(Kots 7i ri ``GoC3 wa tachi id, irr? - 1n sai needle blood procedure amendment (rei) 24th 7th, amendment. Contents (1) From page 95, line 9 to page 96, line 20 of the specification, “Figures 3a to 3u are charts.” Correct as shown.

Claims (4)

【特許請求の範囲】[Claims] (1)像の光情報をデジタル画像情報に変換して入力す
る画像入力手段(A)と、 該像を照明し、その明るさを制御調整する 照明手段(B)と、 該像内の複数の目標物のうち、いづれか1つを選択する
目標物選択手段(C)と、 前記デジタル画像情報を記憶し、入出力を制御する画像
制御記憶手段(D)と、 前記デジタル画像情報の画素のヒストグラムからしきい
値を決定し、該しきい値により2値化した情報を走査し
て、画像境界を検出する画像境界検出手段(E)と、 該画像境界検出手段により検出する境界値から広域走査
領域を設定する広域ウィンドウ設定手段(F)と、 該広域ウィンドウ内を走査して、目標物の位置を検出す
る広域ウィンドウによる目標物検出手段(G)と、 該目標物検出手段で検出する目標物の運動を追跡する狭
域ウィンドウを設定する狭域ウィンドウ設定手段(H)
と、 該狭域ウィンドウ内を走査して、目標物を 追跡する狭域ウィンドウによる目標物追跡手段(I)と
、 追跡した目標物の意図的な運動パターンが、所定の電気
装置を制御可能とする所定のパターンと一致すると、該
電気装置を制御する信号を発信する制御信号判別手段(
J)と、 該制御信号判別手段の信号により、所定の電気装置を制
御する電気装置制御手段(K) とよりなる電気装置の付勢制御装置において、前記狭域
ウィンドウによる目標物追跡手段で目標物を追跡走査す
る過程で、 所定時間毎に測定する目標物の移動データを所定回数集
積し、該所定回数分のデータの平均値および分散値を算
出し、更に該平均値および分散値を、新データの入力の
都度逐次変更記憶する目標物の移動の平均値、分散値算
出手段(L)と、 該平均値および分散値の初期値が決定する と、中域ウィンドウ枠の設定が可能であることを指示す
る中域ウィンドウ設定可能判定手段(M)と、 該平均値および分散値を用いて中域ウィンドウを設定す
る中域ウィンドウ設定手段(N)と、 該設定された中域ウィンドウ内で、目標物を走査検出す
る中域ウィンドウによる目標物検出手段(P) とを設けた電気装置の付勢制御装置。
(1) Image input means (A) for converting optical information of an image into digital image information and inputting it; illumination means (B) for illuminating the image and controlling and adjusting its brightness; and plurality of images in the image. target object selection means (C) for selecting one of the target objects; image control storage means (D) for storing the digital image information and controlling input/output; image boundary detection means (E) that determines a threshold value from the histogram and scans the binarized information using the threshold value to detect image boundaries; wide-area window setting means (F) for setting a scanning area; wide-area window target detection means (G) for scanning within the wide-area window and detecting the position of the target; and detecting with the target object detection means. Narrow window setting means (H) for setting a narrow window for tracking the movement of a target object
and narrow window target tracking means (I) that scans within the narrow window to track the target; and an intentional movement pattern of the tracked target that can control a predetermined electrical device control signal discriminating means (for transmitting a signal to control the electric device when the electric device matches a predetermined pattern);
J); and an electric device control means (K) for controlling a predetermined electric device according to the signal of the control signal discriminating means, wherein the target tracking means using the narrow window detects the target. In the process of tracking and scanning an object, the movement data of the target object measured at predetermined time intervals is accumulated a predetermined number of times, the average value and variance value of the data for the predetermined number of times are calculated, and the average value and variance value are Once the average value and variance calculation means (L) of the movement of the target object are changed and memorized each time new data is input, and the initial values of the average and variance values are determined, it is possible to set the middle range window frame. a mid-range window setting means (N) for setting a mid-range window using the average value and the variance value; , a target object detection means (P) using a mid-range window for scanning and detecting a target object.
(2)請求項(1)に記載の電気装置の付勢制御装置に
おいて、目標物が車上ドライバの瞳または口であって、
意図的な瞳または口の動きを制御信号判定手段(J)で
判別することにより、車上搭載電気装置を付勢制御する
自動車の運転制御装置。
(2) In the energization control device for an electric device according to claim (1), the target object is the eyes or mouth of the onboard driver,
An automobile driving control device that controls the energization of an on-vehicle electrical device by determining intentional eye or mouth movements using a control signal determining means (J).
(3)請求項(1)に記載の電気装置の付勢制御装置に
おいて、目標物が重症患者の瞳または口であって、意図
的な瞳または口の動きを制御信号判定手段(J)で判別
することにより、医療機器または救援機器の電気装置を
付勢制御する重症患者の支援装置。
(3) In the energization control device for an electric device according to claim (1), the target object is the eyes or mouth of a critically ill patient, and the control signal determining means (J) detects intentional movements of the eyes or mouth. A support device for critically ill patients that controls the energization of electrical equipment in medical equipment or rescue equipment by making a determination.
(4)請求項(2)に記載の自動車の運転制御装置にお
いて、ドライバの瞳のまばたき間隔により、制御信号判
定手段(J)で居眠り運転を検知し、警報を発信するド
ライバの居眠り運転防止装置。
(4) In the vehicle driving control device according to claim (2), the driver's drowsy driving prevention device detects drowsy driving using the control signal determination means (J) based on the blink interval of the driver's eyes and issues an alarm. .
JP1004481A 1989-01-11 1989-01-11 Energization control device for electrical equipment Expired - Fee Related JP2802635B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1004481A JP2802635B2 (en) 1989-01-11 1989-01-11 Energization control device for electrical equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1004481A JP2802635B2 (en) 1989-01-11 1989-01-11 Energization control device for electrical equipment

Publications (2)

Publication Number Publication Date
JPH02183811A true JPH02183811A (en) 1990-07-18
JP2802635B2 JP2802635B2 (en) 1998-09-24

Family

ID=11585296

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1004481A Expired - Fee Related JP2802635B2 (en) 1989-01-11 1989-01-11 Energization control device for electrical equipment

Country Status (1)

Country Link
JP (1) JP2802635B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08300978A (en) * 1995-05-10 1996-11-19 Mitsubishi Electric Corp Face image processor
JP2003196017A (en) * 2001-12-25 2003-07-11 Gen Tec:Kk Data input method and device
JP2007122067A (en) * 2006-11-13 2007-05-17 Hoya Corp Method for detecting geometrical center position of progressive multifocal spectacle lens
JP2008065776A (en) * 2006-09-11 2008-03-21 Toyota Motor Corp Doze detection device and doze detection method
JP2017176641A (en) * 2016-03-31 2017-10-05 オムロンオートモーティブエレクトロニクス株式会社 Face image processing apparatus and face image processing system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08300978A (en) * 1995-05-10 1996-11-19 Mitsubishi Electric Corp Face image processor
JP2003196017A (en) * 2001-12-25 2003-07-11 Gen Tec:Kk Data input method and device
JP2008065776A (en) * 2006-09-11 2008-03-21 Toyota Motor Corp Doze detection device and doze detection method
JP2007122067A (en) * 2006-11-13 2007-05-17 Hoya Corp Method for detecting geometrical center position of progressive multifocal spectacle lens
JP2017176641A (en) * 2016-03-31 2017-10-05 オムロンオートモーティブエレクトロニクス株式会社 Face image processing apparatus and face image processing system

Also Published As

Publication number Publication date
JP2802635B2 (en) 1998-09-24

Similar Documents

Publication Publication Date Title
JPH01158579A (en) Image recognizing device
JP4853389B2 (en) Face image capturing device
JPS62247410A (en) Energization controller for electric apparatus
US8102417B2 (en) Eye closure recognition system and method
US8055023B2 (en) Vehicle cabin lighting apparatus
US7253738B2 (en) System and method of detecting eye closure based on edge lines
WO1999036893A1 (en) Method and apparatus for detection of drowsiness
JP2007091081A (en) Dazzling prevention system for vehicle
EP2060993B1 (en) An awareness detection system and method
JP2007025758A (en) Face image extracting method for person, and device therefor
CN110168610B (en) Eyelid detection device, drowsiness determination device, and eyelid detection method
JPH02183811A (en) Energization controller for electrical equipment
JP3905544B2 (en) Face image processing device
JP2001229499A (en) State detecting device for eye
JPH03202045A (en) Detecting device for state of driver
JP3057996B2 (en) Eye position detection device for vehicle driver
JP3685403B2 (en) Face image processing device
KR100619680B1 (en) The method for correcting motion blurring of an iris recognition system
JPH06348980A (en) Device for monitoring eyes of driver on vehicle
JP2541689B2 (en) Eye position detection device and subject state detection device
JP2018143285A (en) Biological state determination apparatus, biological state determination system and biological state determination method
JPH05264225A (en) Device for detecting eyeball position of vehicle driver
JPS63311105A (en) Apparatus for recognizing crew&#39;s position of vehicle
JPH0757072A (en) Driver&#39;s state detector
JPH06270710A (en) Asleep drive alarming device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080717

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees