JP4529635B2 - Open / close eye determination device - Google Patents

Open / close eye determination device Download PDF

Info

Publication number
JP4529635B2
JP4529635B2 JP2004308715A JP2004308715A JP4529635B2 JP 4529635 B2 JP4529635 B2 JP 4529635B2 JP 2004308715 A JP2004308715 A JP 2004308715A JP 2004308715 A JP2004308715 A JP 2004308715A JP 4529635 B2 JP4529635 B2 JP 4529635B2
Authority
JP
Japan
Prior art keywords
value
eye
upper eyelid
curvature
determination threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004308715A
Other languages
Japanese (ja)
Other versions
JP2006120006A (en
Inventor
欣也 岩本
雅之 金田
治夫 松尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP2004308715A priority Critical patent/JP4529635B2/en
Publication of JP2006120006A publication Critical patent/JP2006120006A/en
Application granted granted Critical
Publication of JP4529635B2 publication Critical patent/JP4529635B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、開閉眼判定装置に関する。   The present invention relates to an open / closed eye determination device.

従来、CCDカメラによって取得された顔画像から上瞼部分を検出し、上瞼の両端点を結ぶ直線を求め、この直線に対して上側に位置する部分の面積と眼の面積との比に基づい眼の開閉を判定する開閉眼判定装置が知られている。   Conventionally, an upper eyelid portion is detected from a face image acquired by a CCD camera, a straight line connecting both end points of the upper eyelid is obtained, and based on the ratio of the area of the portion located above the straight line and the area of the eye An open / close eye determination device that determines open / close of an eye is known.

さらに、この装置は、上瞼が上に凸形状か否かで眼の開閉を判定する構成となっている。さらには、この装置は、上瞼の両端点を結ぶ直線と上瞼の重心との位置関係に基づいて眼の開閉を判定する構成となっている(例えば特許文献1参照)。
特開2000−123188号公報
Further, this apparatus is configured to determine whether the eye is opened or closed based on whether or not the upper eyelid is convex upward. Furthermore, this device is configured to determine whether the eye is opened or closed based on the positional relationship between a straight line connecting both end points of the upper eyelid and the center of gravity of the upper eyelid (see, for example, Patent Document 1).
JP 2000-123188 A

しかしながら、従来装置では、眼の回りにノイズ(皺など)が存在する場合、画像処理で求めた上瞼のラインが乱れて正常な曲率が算出できない場合がある。この傾向は、特に開眼時に強く起こり、開眼を閉眼と誤判定しやすくなってしまう。   However, in the conventional apparatus, when there is noise (eg, wrinkles) around the eyes, the upper eyelid line obtained by image processing may be disturbed and normal curvature may not be calculated. This tendency is particularly strong when the eyes are opened, and it is easy to erroneously determine that the eyes are closed.

本発明はこのような従来の課題を解決するためになされたものであり、その目的とするところは、開眼時に閉眼であると誤判定しないようにすることが可能な開閉眼判定装置を提供することにある。   The present invention has been made to solve such a conventional problem, and an object of the present invention is to provide an open / closed eye determination device capable of preventing erroneous determination that the eyes are closed when the eyes are opened. There is.

本発明によれば、開閉眼判定装置は、眼画像取得手段、上瞼検出手段、上瞼座標抽出手段、曲線近似手段、相関値検出手段、開閉眼判定閾値設定手段、上瞼曲率検出手段、及び開閉眼判定手段を備えている。眼画像取得手段は、被検出者の眼を含む眼画像を取得するものである。上瞼検出手段は、眼画像取得手段により取得された眼画像から、上瞼を検出するものである。また、上瞼座標抽出手段は、上瞼検出手段によって検出された上瞼から、上瞼を構成する座標群を抽出するものであり、曲線近似手段は、上瞼座標抽出手段により抽出された上瞼の座標群から上瞼を二次以上の曲線に近似するものである。また、相関値検出手段は、上瞼座標抽出手段により抽出された上瞼の座標群と前記曲線近似手段によって近似された二次以上の曲線との相関値を検出するものである。開閉眼判定閾値設定手段は、相関値検出手段により検出された相関値が基準値よりも高い場合、前記相関値検出手段により検出された相関値が基準値以下の場合よりも、開閉眼判定閾値を大きく設定するものである。上瞼曲率検出手段は、上瞼座標抽出手段により抽出された座標群から、上瞼の曲率を検出するものである。開閉眼判定手段は、上瞼曲率検出手段により検出された上瞼の曲率が、開閉眼判定閾値設定手段により設定された開閉眼判定閾値以上の場合に開眼と判定し、開閉眼判定閾値に満たない場合に閉眼と判定するものである。   According to the present invention, the open / close eye determination device includes an eye image acquisition unit, an upper eyelid detection unit, an upper eyelid coordinate extraction unit, a curve approximation unit, a correlation value detection unit, an open / closed eye determination threshold setting unit, an upper curvature detection unit, And an opening / closing eye determination means. The eye image acquisition means acquires an eye image including the eye of the person to be detected. The upper eyelid detection means detects the upper eyelid from the eye image acquired by the eye image acquisition means. The upper eyelid coordinate extracting means extracts the coordinate group constituting the upper eyelid from the upper eyelid detected by the upper eyelid detecting means, and the curve approximation means is the upper eyelid coordinate extracting means extracted by the upper eyelid coordinate extracting means. The upper heel is approximated to a quadratic or higher curve from the coordinate group of the heel. The correlation value detecting means detects a correlation value between the upper eyelid coordinate group extracted by the upper eyelid coordinate extracting means and a quadratic or higher curve approximated by the curve approximating means. When the correlation value detected by the correlation value detection unit is higher than a reference value, the opening / closing eye determination threshold setting unit is more open / closed eye determination threshold than when the correlation value detected by the correlation value detection unit is less than or equal to the reference value. Is set to a large value. The upper curvature detection means detects the curvature of the upper curvature from the coordinate group extracted by the upper eye coordinate extraction means. The open / close eye determination means determines that the upper eyelid curvature detected by the upper curvature detection means is equal to or greater than the open / close eye determination threshold set by the open / close eye determination threshold setting means, and satisfies the open / close eye determination threshold. If not, the eye is determined to be closed.

本発明によれば、開閉眼判定装置は、上瞼の座標群とこの座標群に近似された二次以上の曲線との相関値を求めている。ここで、相関値が高い場合とは、眼の周りにノイズが少ないなどの事情により、開閉眼について正確に判定し易い状態であることを示している。他方、相関値が低い場合、眼の周りにノイズが多いなどの事情により、開閉眼について誤判定し易い状態であることを示している。   According to the present invention, the open / close eye determination device obtains a correlation value between the upper eyelid coordinate group and a quadratic or higher curve approximated to the coordinate group. Here, the case where the correlation value is high indicates that it is easy to accurately determine the open / closed eye due to circumstances such as little noise around the eye. On the other hand, when the correlation value is low, it indicates that it is easy to make an erroneous determination with respect to the open / closed eye due to a lot of noise around the eye.

また、相関値が基準値よりも高い場合、基準値以下の場合よりも、開閉眼判定閾値を大きく設定している。このため、相関値が基準値よりも高い場合、すなわち開閉眼について正確に判定し易い場合には、開閉眼判定閾値を大きくすることとなる。一方、相関値が基準値以下である場合、すなわち開閉眼について誤判定し易い場合には、開閉眼判定閾値を小さくすることとなる。   In addition, when the correlation value is higher than the reference value, the open / close eye determination threshold is set larger than when the correlation value is equal to or lower than the reference value. For this reason, when the correlation value is higher than the reference value, that is, when it is easy to accurately determine the open / closed eye, the open / closed eye determination threshold value is increased. On the other hand, when the correlation value is less than or equal to the reference value, that is, when it is easy to make an erroneous determination for the open / closed eye, the open / closed eye determination threshold value is decreased.

また、上瞼の曲率を求めて、この曲率が開閉眼判定閾値より大きいときに開眼と判定し、開閉眼判定閾値以下のときに、閉眼と判定するようにしている。ここで、眼の回りにノイズが多いなどの場合には、上瞼の曲率についても検出の精度が落ちる。すなわち、上記相関値が小さい場合には、上瞼の曲率についても検出の精度が落ちる。このため、開眼時にあっては上瞼の曲率を小さく検出してしまうことがある。ところが、本発明では、相関値が基準値以下の場合、開閉眼判定閾値を小さくしている。故に、開眼時に上瞼の曲率を小さく検出してしまっても、開閉眼判定閾値を小さくしているため、開眼時に閉眼と誤判定してしまう可能性を減じることができる。   Further, the curvature of the upper eyelid is obtained, and it is determined that the eye is open when the curvature is larger than the open / closed eye determination threshold, and the closed eye is determined when the curvature is equal to or less than the open / closed eye determination threshold. Here, when there is a lot of noise around the eyes, the accuracy of detection of the curvature of the upper eyelid also decreases. That is, when the correlation value is small, the accuracy of detection also decreases for the curvature of the upper eyelid. For this reason, when the eye is opened, the curvature of the upper eyelid may be detected small. However, in the present invention, when the correlation value is less than or equal to the reference value, the open / close eye determination threshold is reduced. Therefore, even if the curvature of the upper eyelid is detected to be small when the eye is opened, the open / close eye determination threshold value is made small, so that the possibility of erroneously determining that the eye is closed when the eye is opened can be reduced.

従って、開眼時に閉眼であると誤判定しないようにすることができる。   Therefore, it is possible to prevent erroneous determination that the eyes are closed when the eyes are opened.

以下、本発明の好適な実施形態を図面に基づいて説明する。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described with reference to the drawings.

図1は、本発明の実施形態に係る開閉眼判定装置の構成を示す機能ブロック図である。同図に示すように、開閉眼判定装置1は、被検出者の眼が開眼状態にあるか又は閉眼状態にあるかを判定するものであって、眼画像取得手段CL1、上瞼検出手段CL2、及び上瞼座標抽出手段CL3とを備えている。また、開閉眼判定装置1は、曲線近似手段CL4、相関値検出手段CL5、及び開閉眼判定閾値設定手段CL6を具備している。さらに、開閉眼判定装置1は、上瞼曲率検出手段CL7、及び開閉眼判定手段CL8を有している。   FIG. 1 is a functional block diagram showing a configuration of an open / closed eye determination device according to an embodiment of the present invention. As shown in the figure, the open / close eye determination device 1 determines whether the eye of the person to be detected is in an open state or in a closed state, and includes an eye image acquisition unit CL1 and an upper eyelid detection unit CL2. And upper eyelid coordinate extracting means CL3. The open / close eye determination apparatus 1 includes a curve approximation means CL4, a correlation value detection means CL5, and an open / close eye determination threshold setting means CL6. Further, the open / close eye determination device 1 includes an upper curvature detection means CL7 and an open / close eye determination means CL8.

眼画像取得手段CL1は、被検出者の眼を含む眼画像を取得するものである。また、眼画像取得手段CL1は、入力した眼画像のデータを、上瞼検出手段CL2に送信する構成とされている。   The eye image acquisition unit CL1 acquires an eye image including the eyes of the person to be detected. The eye image acquisition means CL1 is configured to transmit the input eye image data to the upper eyelid detection means CL2.

上瞼検出手段CL2は、眼画像取得手段CL1により取得された眼画像から、上瞼を検出するものである。また、上瞼検出手段CL2は、検出した上瞼のデータを上瞼座標抽出手段CL3に送信する構成となっている。   The upper eyelid detection means CL2 detects the upper eyelid from the eye image acquired by the eye image acquisition means CL1. The upper eyelid detection means CL2 is configured to transmit the detected upper eyelid data to the upper eyelid coordinate extraction means CL3.

上瞼座標抽出手段CL3は、上瞼検出手段CL2によって検出された上瞼から、上瞼を構成する座標群を抽出するものである。また、上瞼座標抽出手段CL3は、検出した抽出した上瞼を構成する座標群のデータを曲線近似手段CL4、相関値検出手段CL5及び上瞼曲率検出手段CL7に送信する構成となっている。   The upper eyelid coordinate extracting means CL3 extracts a coordinate group constituting the upper eyelid from the upper eyelid detected by the upper eyelid detecting means CL2. The upper eyelid coordinate extracting means CL3 is configured to transmit the data of the coordinate group constituting the detected upper eyelid to the curve approximating means CL4, the correlation value detecting means CL5, and the upper curvature detecting means CL7.

曲線近似手段CL4は、上瞼座標抽出手段CL3により抽出された上瞼の座標群から上瞼を二次以上の曲線に近似するものである。この曲線近似手段CL4は、例えば上瞼座標抽出手段CL3により抽出された上瞼の座標群から最小二乗法によって、二次の線形多項式に近似する。また、曲線近似手段CL4は、近似した曲線近似線の情報を相関値検出手段CL5に送信する構成となっている。   The curve approximation means CL4 approximates the upper eyelid to a quadratic or higher curve from the upper eyelid coordinate group extracted by the upper eyelid coordinate extraction means CL3. The curve approximating means CL4 approximates a quadratic linear polynomial from the upper eyelid coordinate group extracted by the upper eyelid coordinate extracting means CL3, for example, by the least square method. Further, the curve approximating means CL4 is configured to transmit information on the approximated curve approximating line to the correlation value detecting means CL5.

相関値検出手段CL5は、上瞼座標抽出手段CL3により抽出された上瞼の座標群と、曲線近似手段CL4により近似された曲線近似線との相関値を検出するものである。この相関値検出手段CL5は、相関値を検出すると、このデータを開閉眼判定閾値設定手段CL6に送信する構成となっている。   The correlation value detection means CL5 detects the correlation value between the upper eyelid coordinate group extracted by the upper eyelid coordinate extraction means CL3 and the curve approximation line approximated by the curve approximation means CL4. When the correlation value is detected, the correlation value detection means CL5 is configured to transmit this data to the open / close eye determination threshold setting means CL6.

開閉眼判定閾値設定手段CL6は、相関値検出手段CL5により検出された相関値が基準値よりも高い場合、相関値が基準値以下の場合よりも、開閉眼判定の基準となる開閉眼判定閾値を大きく設定するものである。また、開閉眼判定閾値設定手段CL6は、設定した開閉眼判定閾値の情報を、開閉眼判定手段CL8に送信する構成となっている。   When the correlation value detected by the correlation value detection unit CL5 is higher than the reference value, the opening / closing eye determination threshold setting unit CL6 is an opening / closing eye determination threshold that is a reference for the opening / closing eye determination than when the correlation value is equal to or less than the reference value. Is set to a large value. The opening / closing eye determination threshold value setting means CL6 is configured to transmit information on the set opening / closing eye determination threshold value to the opening / closing eye determination means CL8.

上瞼曲率検出手段CL7は、上瞼座標抽出手段CL3により抽出された座標群から、上瞼の曲率を検出するものである。上瞼曲率検出手段CL7は、検出した上瞼の曲率のデータを開閉眼判定閾値設定手段CL6及び開閉眼判定手段CL8に送信する構成となっている。   The upper curvature detection means CL7 detects the curvature of the upper curvature from the coordinate group extracted by the upper eyelid coordinate extraction means CL3. The upper eyelid curvature detection means CL7 is configured to transmit the detected upper eyelid curvature data to the open / close eye determination threshold value setting means CL6 and the open / close eye determination means CL8.

開閉眼判定手段CL8は、上瞼曲率検出手段CL7により検出された上瞼の曲率が、開閉眼判定閾値設定手段CL6により設定された開閉眼判定閾値以上の場合に開眼と判定し、開閉眼判定閾値に満たない場合に閉眼と判定するものである。また、開閉眼判定手段CL8は、居眠り検出装置などに接続されており、判定した開閉眼の結果を当該装置に送信する構成となっている。   The open / close eye determination means CL8 determines that the eyelid is open when the curvature of the upper eyelid detected by the upper curvature detection means CL7 is equal to or greater than the open / close eye determination threshold set by the open / close eye determination threshold setting means CL6, and the open / close eye determination When the threshold is not reached, it is determined that the eye is closed. The open / close eye determination means CL8 is connected to a dozing detection device or the like, and is configured to transmit the determined result of the open / close eye to the device.

ここで、眼画像取得手段CL1は、詳細には以下の構成となっている。すなわち、図1に示すように、眼画像取得手段CL1は、顔画像取得手段CL11と眼検出手段CL12とを有している。顔画像取得手段CL11は、被検出者の前方略正面に設置され、被検出者の顔全体を撮像するものである。また、眼検出手段CL12は、顔画像撮像手段CL11によって撮像された顔全体を含む画像から被検出者の眼を検出するものである。そして、眼画像取得手段CL1は、眼検出手段CL12によって検出された眼を含み顔画像よりも小さくされた微小画像を、顔画像から抽出して眼画像とする構成となっている。   Here, the eye image acquisition means CL1 has the following configuration in detail. That is, as shown in FIG. 1, the eye image acquisition unit CL1 includes a face image acquisition unit CL11 and an eye detection unit CL12. The face image acquisition means CL11 is installed substantially in front of the detected person and images the entire face of the detected person. The eye detection means CL12 detects the eye of the person to be detected from an image including the entire face imaged by the face image imaging means CL11. The eye image acquisition unit CL1 is configured to extract a minute image that includes the eye detected by the eye detection unit CL12 and is smaller than the face image, from the face image, and forms the eye image.

また、開閉眼判定閾値設定手段CL6は詳細には以下のようになっている。すなわち、図1に示すように、開閉眼判定閾値設定手段CL6は、第1算出手段CL61と第2算出手段CL62とを備えている。第1算出手段CL61は、開眼時の上瞼の曲率の代表値から設定される第1判定閾値を算出するものである。また、第2算出手段CL62は、閉眼時の上瞼の曲率の代表値から設定される第2判定閾値を算出するものである。   The opening / closing eye determination threshold value setting means CL6 is as follows in detail. That is, as shown in FIG. 1, the open / close eye determination threshold value setting means CL6 includes first calculation means CL61 and second calculation means CL62. The first calculation means CL61 calculates a first determination threshold value set from the representative value of the curvature of the upper eyelid when the eye is opened. The second calculation means CL62 calculates a second determination threshold value set from a representative value of the curvature of the upper eyelid when the eye is closed.

さらに、図1に示すように第1算出手段CL61は、第1サンプリング手段CL611と、第1代表値算出手段CL612とを有している。第1サンプリング手段CL611は、上瞼の曲率を所定数サンプリングするものである。第1代表値算出手段CL612は、第1サンプリング手段CL611によってサンプリングされた所定数の曲率から、平均値、中央値又は最頻値のいずれか1つを算出し、算出した値を第1の統計的代表値とするものである。   Further, as shown in FIG. 1, the first calculation means CL61 has a first sampling means CL611 and a first representative value calculation means CL612. The first sampling means CL611 samples a predetermined number of curvatures of the upper eyelid. The first representative value calculation means CL612 calculates one of an average value, a median value, and a mode value from a predetermined number of curvatures sampled by the first sampling means CL611, and the calculated value is used as the first statistical value. Representative value.

また、図1に示すように第2算出手段CL62は、第2サンプリング手段CL621と、第2代表値算出手段CL622とを有している。第2サンプリング手段CL621は、上瞼の曲率を所定数サンプリングするものである。第2代表値算出手段CL622は、第2サンプリング手段CL621によってサンプリングされた所定数の曲率から、平均値、中央値又は最頻値のいずれか1つを求めるものである。   Further, as shown in FIG. 1, the second calculation means CL62 includes a second sampling means CL621 and a second representative value calculation means CL622. The second sampling means CL621 samples a predetermined number of curvatures of the upper eyelid. The second representative value calculating unit CL622 calculates one of an average value, a median value, and a mode value from a predetermined number of curvatures sampled by the second sampling unit CL621.

なお、第1算出手段CL61及び第2算出手段CL62については、後述のフローチャートにて詳細に説明するものとする。   The first calculation unit CL61 and the second calculation unit CL62 will be described in detail in a flowchart described later.

図2は、本発明の実施形態に係る開閉眼判定装置1のハード構成図である。同図に示すように、TVカメラ2が自動車のインストルメント上に設けられている。TVカメラ2は、運転者を略正面から撮像できる位置に設置されており、少なくとも運転者の顔全体を撮影するようにされている。すなわち、このTVカメラ2が図1を参照して説明した顔画像取得手段CL11を構成している。   FIG. 2 is a hardware configuration diagram of the open / close eye determination device 1 according to the embodiment of the present invention. As shown in the figure, a TV camera 2 is provided on an automobile instrument. The TV camera 2 is installed at a position where the driver can be imaged from substantially the front, and at least captures the entire face of the driver. That is, the TV camera 2 constitutes the face image acquisition means CL11 described with reference to FIG.

また、TVカメラ2の入力画像は、本実施形態では、例えば横方向(X)640画素、縦方向(Y)480画素からなる。TVカメラ2で撮像された入力画像は、インストルメント裏側など車体内部に設置されたマイクロコンピュータ(以下、マイコンという)3に画像データとして入力される。   In the present embodiment, the input image of the TV camera 2 includes, for example, a horizontal direction (X) 640 pixels and a vertical direction (Y) 480 pixels. An input image captured by the TV camera 2 is input as image data to a microcomputer 3 (hereinafter referred to as a microcomputer) installed inside the vehicle body such as the back side of the instrument.

マイコン3には、眼検出手段CL12、上瞼検出手段CL2、上瞼座標抽出手段CL3、曲線近似手段CL4、相関値検出手段CL5、開閉眼判定閾値設定手段CL6、上瞼曲率検出手段CL7、及び開閉眼判定手段CL8を構成するプログラムロジックがプログラミングされている。そして、マイコン3は、TVカメラ2からの顔全体を含む画像のデータを入力すると、プログラムを実行して、運転者の開閉眼を判定していくこととなる。   The microcomputer 3 includes eye detection means CL12, upper eyelid detection means CL2, upper eyelid coordinate extraction means CL3, curve approximation means CL4, correlation value detection means CL5, open / closed eye determination threshold setting means CL6, upper curvature detection means CL7, and Program logic that constitutes the open / close eye determination means CL8 is programmed. And if the microcomputer 3 inputs the data of the image containing the whole face from the TV camera 2, a program will be run and it will determine a driver | operator's opening and closing eyes.

また、TVカメラ2等は、図3に示す構成であってもよい。図3は、顔画像取得手段CL11の他の例を示すハード構成図である。この例の場合、顔画像取得手段CL11としてのTVカメラ2は、運転者の頭部に取り付けられている。また、TVカメラ2は、ミラー4を介して眼を撮像するように構成されている。このように、ミラー4を介して眼の周辺部のみを撮像することにより、図1に示した眼検出手段CL12を不要にし、構成及び処理の簡素化を図ることができる。   Further, the TV camera 2 or the like may have the configuration shown in FIG. FIG. 3 is a hardware configuration diagram showing another example of the face image acquisition means CL11. In the case of this example, the TV camera 2 as the face image acquisition means CL11 is attached to the driver's head. The TV camera 2 is configured to take an image of the eye through the mirror 4. Thus, by imaging only the peripheral part of the eye via the mirror 4, the eye detection means CL12 shown in FIG. 1 is not required, and the configuration and processing can be simplified.

なお、TVカメラ2は、ミラー4の位置に設置され、直接に眼を撮像する構成とされてもよい。さらに、TVカメラ2は、インストルメント上に設置されされ、運転者に視点の位置を自動追尾しながら眼を撮像する構成とされてもよい。   Note that the TV camera 2 may be installed at the position of the mirror 4 and directly take an image of the eye. Furthermore, the TV camera 2 may be installed on the instrument, and may be configured to image the eye while automatically tracking the viewpoint position to the driver.

ここで、本実施形態に係る開閉眼判定装置1の動作の概略を、図1を参照して説明する。まず、眼画像取得手段CL1は、被検出者の顔を撮像して眼を含む眼画像を取得する。次いで、上瞼検出手段CL2は、被検出者の上瞼を検出する。   Here, an outline of the operation of the open / closed eye determination device 1 according to the present embodiment will be described with reference to FIG. First, the eye image acquisition unit CL1 acquires an eye image including the eye by imaging the face of the person to be detected. Next, the upper eyelid detection means CL2 detects the upper eyelid of the detected person.

そして、上瞼座標抽出手段CL3は、上瞼検出手段CL2により検出された被検出者の上瞼について座標群を抽出する。また、曲線近似手段CL4は、上瞼座標抽出手段CL3により抽出された上瞼の座標群から、上瞼を二次以上の曲線に近似する。次いで、相関値検出手段CL5は、上瞼の座標群と近似された二次以上の曲線との相関値を検出する。   Then, the upper eyelid coordinate extracting means CL3 extracts a coordinate group for the upper eyelid of the detected person detected by the upper eyelid detecting means CL2. The curve approximation means CL4 approximates the upper eyelid to a quadratic or higher curve from the upper eyelid coordinate group extracted by the upper eyelid coordinate extraction means CL3. Next, the correlation value detection means CL5 detects the correlation value between the upper eyelid coordinate group and the approximated quadratic or higher curve.

ここで、図4を参照して相関値検出手段CL5を詳細に説明する。図4は、上瞼の様子を示す説明図であり、(a)は眼の周りにノイズが少ない場合の例を示し、(b)は眼の周りにノイズが多い場合の例を示している。なお、図4(a)及び(b)ではそれぞれ眼部分を画像処理したときの様子についても図示している。   Here, the correlation value detection means CL5 will be described in detail with reference to FIG. 4A and 4B are explanatory diagrams showing the state of the upper eyelid, in which FIG. 4A shows an example in which there is little noise around the eye, and FIG. 4B shows an example in which there is much noise around the eye. . FIGS. 4A and 4B also show the state when the eye part is image-processed.

まず、図4(a)に示すように、眼の周りにノイズが少ない場合、画像処理の様子から明らかなように、上瞼座標抽出手段CL3により抽出される上瞼の座標群は上に凸の弧状となる。また、曲線近似手段CL4により近似される曲線近似線についても、後述の曲線近似手段CL4に係る説明から明らかなように、上に凸の弧状となる。従って、眼の周りにノイズが少ない場合、上瞼の座標群と曲線近似線との相関値は高くなる。   First, as shown in FIG. 4A, when there is little noise around the eye, the upper eyelid coordinate group extracted by the upper eyelid coordinate extracting means CL3 is convex upward as is apparent from the state of image processing. It becomes an arc shape. Further, the curve approximation line approximated by the curve approximation means CL4 also has an upwardly convex arc shape, as is apparent from the description relating to the curve approximation means CL4 described later. Accordingly, when there is little noise around the eyes, the correlation value between the upper eyelid coordinate group and the curve approximation line becomes high.

一方、図4(b)に示すように、眼の周りにノイズが多い場合、画像処理の様子から明らかなように、上瞼の座標群は上に凸の弧状に検出されることはなく、途切れ途切れの線として検出される。そして、曲線近似線は上に凸の弧状となることから、眼の周りにノイズが多い場合、上瞼の座標群と曲線近似線との相関値は低くなる。   On the other hand, as shown in FIG. 4B, when there is a lot of noise around the eye, as is clear from the state of image processing, the coordinate group of the upper eyelid is not detected in an upwardly convex arc shape, Detected as a broken line. Since the curved approximate line has an upwardly convex arc shape, when there is a lot of noise around the eyes, the correlation value between the upper eyelid coordinate group and the curved approximate line is low.

再度図1を参照する。上瞼曲率検出手段CL7は、上瞼座標抽出手段CL3により抽出された座標群から、上瞼の曲率を検出する。ここで、眼の周りにノイズが少ない場合、上瞼曲率検出手段CL7は曲率を正確に検出しやすく、眼の周りにノイズが多い場合、上瞼曲率検出手段CL7は曲率を正確に検出し難くなる。   Refer to FIG. 1 again. The upper curvature detection means CL7 detects the curvature of the upper curvature from the coordinate group extracted by the upper eyelid coordinate extraction means CL3. Here, when there is little noise around the eye, the upper curvature detection means CL7 is easy to detect the curvature accurately, and when there is a lot of noise around the eye, the upper curvature detection means CL7 is difficult to detect the curvature accurately. Become.

ここで、曲率と相関値とは次のような関係がある。図5は、上瞼の曲率半径と相関値との関係を示す説明図であり、(a)は眼の周りにノイズが少ない場合の例を示し、(b)は眼の周りにノイズが多い場合の例を示している。なお、図5において縦軸は曲率半径を示し、横軸は相関値を示している。   Here, the curvature and the correlation value have the following relationship. FIGS. 5A and 5B are explanatory diagrams showing the relationship between the curvature radius of the upper eyelid and the correlation value. FIG. 5A shows an example in which there is little noise around the eye, and FIG. 5B shows that there is much noise around the eye. An example of the case is shown. In FIG. 5, the vertical axis represents the radius of curvature, and the horizontal axis represents the correlation value.

まず、眼の周りにノイズが少ない場合、図5(a)に示すように、相関値は高く「1」付近に集中している。すなわち、眼の周りにノイズが少ない場合、上瞼の座標群及び曲線近似線の双方を精度よく求めることができるため、相関値は高く「1」付近に集中している。また、ノイズが少ない場合、上瞼の曲率も正確に求められることから、開眼時と閉眼時との曲率の値は異なることとなる。すなわち、図5(a)に示すように、開眼時における曲率半径は「100」以下の値を示し、閉眼時における曲率半径は「100」より大きい値を示すこととなる。従って、開閉眼判定装置1は、曲率半径が「100」となるように開閉眼判定閾値を設定することで、精度良く開閉眼判定できることとなる。   First, when there is little noise around the eyes, as shown in FIG. 5A, the correlation value is high and concentrated near “1”. That is, when there is little noise around the eyes, both the coordinate group of the upper eyelid and the curve approximation line can be obtained with high accuracy, so the correlation value is high and concentrated near “1”. In addition, when the noise is low, the curvature of the upper eyelid is also accurately obtained, so that the curvature values are different between when the eyes are opened and when the eyes are closed. That is, as shown in FIG. 5 (a), the radius of curvature when the eye is opened shows a value of "100" or less, and the radius of curvature when the eye is closed shows a value larger than "100". Therefore, the opening / closing eye determination device 1 can accurately determine the opening / closing eye by setting the opening / closing eye determination threshold value so that the curvature radius becomes “100”.

他方、眼の周りにノイズが多い場合、図5(b)に示すように、相関値は約「0.4」から「1」までのばらついて検出されることとなる。すなわち、眼の周りにノイズが多い場合、ノイズの影響から相関値が「0.4」付近などの低い値となる場合がある。また、ノイズが多い場合、上瞼の曲率を正確に求め難い。よって、開眼時における曲率半径は相関値が約「0.85」よりも高い場合に「170」以下の値を示しているが、相関値が約「0.85」以下である場合、約「350」付近まで検出されることとなる。同様に、閉眼時における曲率半径は相関値が約「0.85」より高い場合に「170」以上の値を示しているが、相関値が約「0.85」以下である場合、約「350」付近まで検出されることとなる。   On the other hand, when there is a lot of noise around the eyes, as shown in FIG. 5 (b), the correlation value varies from about “0.4” to “1”. That is, when there is a lot of noise around the eyes, the correlation value may be a low value such as “0.4” due to the influence of noise. Also, when there is a lot of noise, it is difficult to accurately determine the curvature of the upper eyelid. Therefore, the radius of curvature at the time of eye opening shows a value of “170” or less when the correlation value is higher than about “0.85”, but when the correlation value is about “0.85” or less, about “ 350 "vicinity is detected. Similarly, when the correlation value is higher than about “0.85”, the radius of curvature when the eye is closed shows a value of “170” or more, but when the correlation value is about “0.85” or less, about “ 350 "vicinity is detected.

このため、開閉眼判定装置1は、曲率半径が「170」となるように開閉眼判定閾値を設定したとしても、開閉眼判定を精度良く行うことができず、被検出者が開眼状態であるにも関わらず、閉眼と誤判定してしまうことがある。   For this reason, even if the open / closed eye determination threshold is set so that the radius of curvature is “170”, the open / closed eye determination device 1 cannot accurately perform the open / closed eye determination, and the detected person is in the open state. Nevertheless, it may be erroneously determined to be closed.

そこで、開閉眼判定閾値設定手段CL6は、相関値検出手段CL5により検出された相関値が基準値よりも高い場合、相関値が基準値以下の場合よりも、開閉眼判定閾値を大きく設定することとしている。   Therefore, when the correlation value detected by the correlation value detection unit CL5 is higher than the reference value, the opening / closing eye determination threshold setting unit CL6 sets the opening / closing eye determination threshold larger than when the correlation value is equal to or lower than the reference value. It is said.

具体的に図5(b)に示す例の場合、本装置1は、基準値を図6に示すようにし、開閉眼判定閾値を図7に示すようにする。図6は、基準値の説明図であり、図7は、開閉眼判定閾値の説明図である。なお、図6において縦軸は出現頻度を示し、横軸は相関値を示している。また、図7において縦軸は曲率半径を示し、横軸は相関値を示している。   Specifically, in the case of the example shown in FIG. 5B, the apparatus 1 sets the reference value as shown in FIG. 6 and the opening / closing eye determination threshold as shown in FIG. FIG. 6 is an explanatory diagram of a reference value, and FIG. 7 is an explanatory diagram of an open / closed eye determination threshold value. In FIG. 6, the vertical axis indicates the appearance frequency, and the horizontal axis indicates the correlation value. In FIG. 7, the vertical axis indicates the radius of curvature, and the horizontal axis indicates the correlation value.

まず、図6に示すように、眼の回りにノイズが多い場合であっても、相関値はほぼ「0.85」を超えることとなる。また、相関値が「0.85」を超える場合、図5(b)に示すように、開眼と閉眼とは、曲率半径が約「170」を境として切り分けられることとなる。従って、相関値が「0.85」を超える場合、図7に示すように開閉眼判定閾値を曲率半径「170」となるように設定すれば、開眼と閉眼とを正確に判定できることとなる。   First, as shown in FIG. 6, even when there is a lot of noise around the eyes, the correlation value exceeds approximately “0.85”. When the correlation value exceeds “0.85”, as shown in FIG. 5B, the eye opening and the eye closing are separated with a curvature radius of about “170” as a boundary. Therefore, when the correlation value exceeds “0.85”, it is possible to accurately determine whether the eye is open or closed by setting the open / close eye determination threshold value to have a curvature radius “170” as shown in FIG.

一方、相関値が「0.85」以下の場合、図5(b)に示すように、開眼と閉眼との切り分けは困難であるが、開眼時において上瞼の曲率半径は「350」を超えることがない。従って、相関値が「0.85」以下の場合、図7に示すように開閉眼判定閾値を曲率半径「350」となるように設定すれば、開眼を誤って閉眼と判定しないようにすることとなる。   On the other hand, when the correlation value is “0.85” or less, as shown in FIG. 5 (b), it is difficult to distinguish between the open eye and the closed eye, but the curvature radius of the upper eyelid exceeds “350” when the eye is opened. There is nothing. Accordingly, when the correlation value is “0.85” or less, as shown in FIG. 7, if the opening / closing eye determination threshold is set to have the curvature radius “350”, the eye opening is not erroneously determined to be closed. It becomes.

以上から、開閉眼判定閾値設定手段CL6は、相関値が「0.85」を超える場合、開閉眼判定閾値を曲率半径「170」で設定する。また、開閉眼判定閾値設定手段CL6は、相関値が「0.85」以下の場合、開閉眼判定閾値を曲率半径「350」で設定する。これにより、本装置1は、開眼時に閉眼と誤判定してしまう可能性を減じている。   From the above, when the correlation value exceeds “0.85”, the open / close eye determination threshold value setting means CL6 sets the open / close eye determination threshold value with the curvature radius “170”. In addition, when the correlation value is “0.85” or less, the open / close eye determination threshold value setting unit CL6 sets the open / close eye determination threshold value with the curvature radius “350”. Thereby, this apparatus 1 reduces the possibility of erroneously determining that the eyes are closed when the eyes are opened.

そして、開閉眼判定手段CL8は、上瞼曲率検出手段CL7により検出された上瞼の曲率が、開閉眼判定閾値設定手段CL6により開閉眼判定閾値以上の場合に開眼と判定し、開閉眼判定閾値に満たない場合に閉眼と判定する。   The opening / closing eye determination means CL8 determines that the upper eyelid curvature detected by the upper curvature detection means CL7 is greater than or equal to the opening / closing eye determination threshold by the opening / closing eye determination threshold setting means CL6, and determines the opening / closing eye determination threshold. It is determined that the eye is closed when it is less than.

なお、上記の曲率半径「170」及び「350」という値は、図5(b)に示す場合において好適な開閉眼判定閾値であって、他の被検出者を撮像した場合などには、値が異なることは言うまでもない。   Note that the values of the above-mentioned curvature radii “170” and “350” are suitable open / closed eye determination threshold values in the case shown in FIG. 5B, and are values when other subjects are imaged. Needless to say that is different.

次に、本実施形態に係る開閉眼判定装置1の詳細動作について説明する。なお、本装置1は、自動車、鉄道車両、船舶の運転者やプラントのオペレータ等の開閉眼検知に用いることができるが、以下の説明においては、自動車の運転者の開閉眼検知に用いることができる開閉眼判定装置1を例に説明することとする。   Next, a detailed operation of the open / close eye determination device 1 according to the present embodiment will be described. In addition, although this apparatus 1 can be used for detection of opening / closing eyes of a driver of a car, a railway vehicle, a ship, a plant operator, etc., in the following description, it is used for detection of opening / closing eyes of a driver of a car. The open / closed eye determination device 1 will be described as an example.

図8は、第1実施形態に係る開閉眼判定装置1の動作の概略を示すメインフローチャートである。同図に示すように、まず、処理が開始されると、マイコン3は、初期値入力処理を実行する(ST10)。この初期値入力の処理では、サンプリング時間などの各種定数が読み込まれる。   FIG. 8 is a main flowchart showing an outline of the operation of the open / close eye determination device 1 according to the first embodiment. As shown in the figure, first, when the process is started, the microcomputer 3 executes an initial value input process (ST10). In this initial value input process, various constants such as sampling time are read.

その後、マイコン3は、処理フレームカウンタ「i」を「0」に初期化する(ST11)。初期化後、マイコン3は、終了判断処理を実行する(ST12)。この際、マイコン3は、例えばエンジンが起動しているか等に基づいて判断を行う。   Thereafter, the microcomputer 3 initializes the processing frame counter “i” to “0” (ST11). After initialization, the microcomputer 3 executes an end determination process (ST12). At this time, the microcomputer 3 makes a determination based on, for example, whether the engine is activated.

そして、マイコン3は、「STOP」か否かを判断する(ST13)。例えばエンジンが起動されていないと判断した場合、マイコン3は、「STOP」であると判断し(ST13:YES)、処理は終了することとなる。   Then, the microcomputer 3 determines whether it is “STOP” (ST13). For example, if it is determined that the engine is not activated, the microcomputer 3 determines that it is “STOP” (ST13: YES), and the process ends.

一方、エンジンが起動され走行しているなどにより、「STOP」でないと判断した場合(ST13:NO)、マイコン3は、眼画像の取得処理を実行する(ST14)。これにより、図2に示す構成例にあっては、TVカメラ2が運転者の顔全体を撮像し、マイコン3が顔全体の画像から眼画像を取得する。また、図3に示す構成の場合、TVカメラ2は直接に眼画像を取得することとなる。また、この処理は、マイコン3が眼画像取得手段CL1に相当するプログラムを実行することにより為される。   On the other hand, when it is determined that it is not “STOP” due to the engine being started and running (ST13: NO), the microcomputer 3 executes an eye image acquisition process (ST14). Thereby, in the configuration example shown in FIG. 2, the TV camera 2 captures the entire face of the driver, and the microcomputer 3 acquires an eye image from the image of the entire face. In the case of the configuration shown in FIG. 3, the TV camera 2 directly acquires an eye image. This process is performed by the microcomputer 3 executing a program corresponding to the eye image acquisition means CL1.

図9は、図8に示した眼画像取得処理(ST14)の詳細な動作を示すフローチャートである。本装置1が図2に示す構成を採用している場合、以下の処理により眼画像が取得される。   FIG. 9 is a flowchart showing a detailed operation of the eye image acquisition process (ST14) shown in FIG. When the apparatus 1 employs the configuration shown in FIG. 2, an eye image is acquired by the following process.

まず、同図に示すように、ステップST13にて「NO」と判断された場合、TVカメラ2は、運転者の顔全体を撮像することにより顔画像を取得する(ST30)。そして、マイコン3は、眼の候補位置の特定処理を実行する(ST31)。この処理により、画像全体から眼の候補位置が1又は複数特定される。具体的には、画像全体から左眼及び右眼である可能性を有する候補の位置が1又は複数特定される。   First, as shown in the figure, if “NO” is determined in step ST13, the TV camera 2 acquires a face image by imaging the entire face of the driver (ST30). Then, the microcomputer 3 executes a process for specifying the candidate eye position (ST31). With this process, one or a plurality of candidate eye positions are specified from the entire image. Specifically, one or more candidate positions having the possibility of being the left eye and the right eye are specified from the entire image.

その後、マイコン3は、眼判定処理を実行する(ST32)。すなわち、ステップST31により特定された候補のうち1つを対象とし、その1つが眼であるか否かを判断する。この処理において、マイコン3は、候補が眼であると判断した場合、この眼を含み顔画像よりも小さくされた微小画像を、顔画像から抽出して眼画像とする。   Thereafter, the microcomputer 3 executes an eye determination process (ST32). That is, it is determined whether or not one of the candidates identified in step ST31 is an eye. In this process, when the microcomputer 3 determines that the candidate is an eye, the microcomputer 3 extracts a minute image that includes the eye and is smaller than the face image from the face image, and sets the image as an eye image.

その後、マイコン3は、眼判定処理(ST32)の結果に基づいて候補が眼であると判定されたか否かを判断する(ST33)。ここで、ステップST32において候補が眼であると判定されず、眼画像が取得できていない場合には、マイコン3は、候補が眼でなかったと判断する(ST33:NO)。そして、マイコン3は、ステップST31にて特定された候補のすべてについて判定したか否かを判断する(ST34)。すべてについて判定した場合(ST34:YES)、処理は図8のステップST15に移行する。   Thereafter, the microcomputer 3 determines whether or not the candidate is determined to be an eye based on the result of the eye determination process (ST32) (ST33). If the candidate is not determined to be an eye in step ST32 and an eye image has not been acquired, the microcomputer 3 determines that the candidate is not an eye (ST33: NO). Then, the microcomputer 3 determines whether or not all of the candidates specified in step ST31 have been determined (ST34). If all the determinations are made (ST34: YES), the process proceeds to step ST15 in FIG.

一方、すべてに対して判定していない場合(ST34:NO)、処理はステップST32に戻る。そして、マイコン3は、ステップST32にて、他の候補を選択し、再度、選択した候補が眼であるか否かを判断することとなる。   On the other hand, when it has not determined for all (ST34: NO), the process returns to step ST32. In step ST32, the microcomputer 3 selects another candidate and determines again whether or not the selected candidate is an eye.

ところで、ステップST32において候補が眼であると判断され、眼画像が抽出された場合、マイコン3は候補が眼であったと判断する(ST33:YES)。そして、マイコン3はステップST32において抽出された眼画像を取得し、処理はステップST15に戻る。   By the way, when it is determined in step ST32 that the candidate is an eye and an eye image is extracted, the microcomputer 3 determines that the candidate is an eye (ST33: YES). And the microcomputer 3 acquires the eye image extracted in step ST32, and a process returns to step ST15.

以上のようにして、本装置1は眼画像を取得する。なお、眼である可能性を有する候補を特定する処理(ST31)及び眼判定処理(ST32)は、マイコン3が眼検出手段CL12に相当するプログラムを実行することによって、以下のようにして行われる。   As described above, the present apparatus 1 acquires an eye image. Note that the process (ST31) and the eye determination process (ST32) for identifying a candidate having the possibility of being an eye are performed as follows when the microcomputer 3 executes a program corresponding to the eye detection means CL12. .

図10は、図9に示した眼候補位置特定処理(ST31)の詳細を示すフローチャートである。同図において、まず、マイコン3は、撮像した画像のデータ全体を、全体画像として画像メモリに保存する(ST40)。   FIG. 10 is a flowchart showing details of the eye candidate position specifying process (ST31) shown in FIG. In the figure, first, the microcomputer 3 stores the entire data of the captured image as an entire image in the image memory (ST40).

次に、マイコン3は、ステップST41の判断を行う。この判断については後述する。ステップST41において「NO」と判断された場合、マイコン3は、全体画像の縦方向(Y軸方向)の画素列のうち1ラインのみに沿って濃度値の相加平均演算を行う(ST42)。   Next, the microcomputer 3 performs the determination in step ST41. This determination will be described later. If “NO” is determined in step ST41, the microcomputer 3 performs an arithmetic mean calculation of the density values along only one line in the pixel row in the vertical direction (Y-axis direction) of the entire image (ST42).

この相加平均演算は、例えば縦方向に並ぶ所定数の画素について、濃度の平均値を求め、所定数の画素のうちの1画素の濃度値を平均値とする処理である。例えば、所定数が「5」である場合、画面上方から1〜5番目に位置する画素を選択して平均値を求め、この平均値を5番目の画素の濃度値とする。次に、画面上方から2〜6番目に位置する画素を選択して平均値を求め、この平均値を6番目の画素の濃度値とする。そして、これを順次繰り返し、1ラインすべての画素について濃度の平均値を求める。   This arithmetic average calculation is a process of obtaining an average density value for a predetermined number of pixels arranged in the vertical direction, for example, and setting the density value of one pixel out of the predetermined number of pixels as an average value. For example, when the predetermined number is “5”, the first to fifth pixels from the top of the screen are selected to obtain an average value, and this average value is set as the density value of the fifth pixel. Next, the second to sixth pixels from the top of the screen are selected to obtain an average value, and this average value is set as the density value of the sixth pixel. Then, this is sequentially repeated to obtain the average density value for all the pixels in one line.

このように相加平均演算することで、本装置1は、画像データ撮影時の濃度変化の小さなバラツキを無くすことができ、濃度値の大局的な変化を捉えることができる。   By performing the arithmetic mean calculation in this way, the present apparatus 1 can eliminate small variations in density changes during image data shooting, and can capture global changes in density values.

相加平均演算後、マイコン3は、縦方向に相加平均値の微分演算を行う(ST43)。そして、マイコン3は、微分値に基づいてポイント抽出を行う(ST44)。このポイント抽出とは、縦方向の画素列に沿って画素濃度の相加平均値の局所的な高まり毎に1個ずつの画素を定める処理であって、例えば相加平均値の微分値が負から正に変化する画素を定める処理である。   After the arithmetic mean calculation, the microcomputer 3 performs differential arithmetic on the arithmetic mean value in the vertical direction (ST43). Then, the microcomputer 3 performs point extraction based on the differential value (ST44). This point extraction is a process of determining one pixel for each local increase in the arithmetic average value of the pixel density along the vertical pixel row. For example, the differential value of the arithmetic average value is negative. This process determines a pixel that changes from positive to negative.

ポイントとなる画素を定めた後、マイコン3は、現在ポイント抽出していたラインを次ラインへ切り替える(ST45)。   After determining the pixel to be a point, the microcomputer 3 switches the line from which the current point has been extracted to the next line (ST45).

そして、マイコン3は、縦方向の全ラインでのポイント抽出が終了したか否かを判断する(ST41)。全ラインでのポイント抽出が終了していないと判断した場合(ST41:NO)、前述のステップST42〜ST45の処理を経て、再度ステップST41に戻る。   Then, the microcomputer 3 determines whether or not point extraction has been completed for all the vertical lines (ST41). When it is determined that the point extraction has not been completed for all lines (ST41: NO), the process returns to step ST41 again through the processes of steps ST42 to ST45 described above.

一方、全ラインでのポイント抽出が終了したと判断した場合(ST41:YES)、隣り合う各ラインの抽出ポイントのY座標値を比較する。そして、Y座標値が所定値以内の場合、連続データとして、(i)連続データのグループ番号、(ii)連続開始ライン番号、(iii)連続データ数をメモリする。また、(iv)連続データを構成する各抽出ポイントの縦方向位置の平均値(その連続データの代表上下位置)、(v)連続開始ラインと終了ラインの横方向位置の平均値(その連続データの代表左右位置)をメモリする(ST36)。   On the other hand, when it is determined that the point extraction has been completed for all lines (ST41: YES), the Y coordinate values of the extraction points of the adjacent lines are compared. When the Y coordinate value is within a predetermined value, (i) the group number of continuous data, (ii) the continuous start line number, and (iii) the number of continuous data are stored as continuous data. In addition, (iv) the average value of the vertical position of each extraction point constituting the continuous data (representative vertical position of the continuous data), (v) the average value of the horizontal position of the continuous start line and end line (the continuous data) Are stored (ST36).

なお、本実施形態では、眼を検出対象としているため、連続データは横方向比較的長く延びるものとなる。このため、マイコン3は、連続データ形成後、横方向に所定値以上続くことを条件に連続データを選択することができる。   In the present embodiment, since the eye is a detection target, continuous data extends relatively long in the horizontal direction. For this reason, the microcomputer 3 can select the continuous data on the condition that after the continuous data is formed, it continues in the horizontal direction for a predetermined value or more.

その後、マイコン3は、各連続データについて代表座標値Cを定め、これを基準として存在領域EAを設定する(ST47)。この代表座標値Cとは、ステップST46の処理において、メモリされたX座標値の平均値及びY座標値の平均値により決定されるものである(上記iv,vに示す平均値)。   Thereafter, the microcomputer 3 determines the representative coordinate value C for each continuous data, and sets the existence area EA using this as a reference (ST47). The representative coordinate value C is determined by the average value of the stored X coordinate values and the average value of the Y coordinate values in the process of step ST46 (average values shown in iv and v above).

代表座標値Cを定めて存在領域EAを設定した後、処理は、図5のステップST32に移行する。以上が、眼候補位置特定処理(ST31)である。以上のようにして、求められた連続データが眼の候補となり、連続データの代表座標値Cが眼の候補点の位置となる。   After the representative coordinate value C is determined and the existence area EA is set, the process proceeds to step ST32 in FIG. The above is the eye candidate position specifying process (ST31). As described above, the obtained continuous data becomes the eye candidate, and the representative coordinate value C of the continuous data becomes the position of the eye candidate point.

図11は、図10に示したステップST46の処理にて形成される連続データ、並びにステップST37の処理にて定められる代表座標値C及び存在領域EAを示す説明図である。なお、眼候補位置特定処理(ST31)は、1又は複数の眼の候補を特定するものであるが、図7では複数の眼の候補が特定された場合を例に説明する。   FIG. 11 is an explanatory diagram showing the continuous data formed by the process of step ST46 shown in FIG. 10, and the representative coordinate value C and the existence area EA determined by the process of step ST37. The eye candidate position specifying process (ST31) specifies one or a plurality of eye candidates, but FIG. 7 illustrates an example in which a plurality of eye candidates are specified.

同図に示すように、マイコン3は、複数の連続データGを形成している。これは、眼を検出対象としているため、眼と似た特徴量を示すもの(口、鼻、眉毛など)が検出されるためである。   As shown in the figure, the microcomputer 3 forms a plurality of continuous data G. This is because an eye is a detection target, and a feature amount (mouth, nose, eyebrows, etc.) that is similar to the eye is detected.

連続データGは、前述したように、縦方向の画素列ごとに定められた抽出ポイントが画像横方向に隣接する場合に形成されるものである。そして、この連続データを形成する横方向両端画素のX座標値の平均値と、連続データを形成する各画素のY座標値の平均値により、代表座標値Cが決定される。さらに、存在領域EAは、この代表座標値Cを基準として設定される。   As described above, the continuous data G is formed when the extraction points determined for each pixel column in the vertical direction are adjacent in the horizontal direction of the image. Then, the representative coordinate value C is determined by the average value of the X coordinate values of the pixels in the lateral direction forming the continuous data and the average value of the Y coordinate values of the pixels forming the continuous data. Further, the existence area EA is set with the representative coordinate value C as a reference.

次に、存在領域EAの設定方法を説明する。図12は、図11に示した存在領域EAの大きさを示す説明図であり、図13及び図14は数人の眼の大きさを調べた横Xa、縦Yaの長さの統計データを示す説明図であり、図15は存在領域EAの画像上の位置を決定する方法を示す説明図である。   Next, a method for setting the existence area EA will be described. FIG. 12 is an explanatory diagram showing the size of the existence area EA shown in FIG. 11, and FIGS. 13 and 14 show statistical data on the lengths of horizontal Xa and vertical Ya, which are obtained by examining the size of several eyes. FIG. 15 is an explanatory diagram showing a method of determining the position of the existence area EA on the image.

存在領域EAの設定は、まず、存在領域EAの大きさが決定され、その後、存在領域EAの画像上における位置が定められることでなされる。   The existence area EA is set by first determining the size of the existence area EA and then determining the position of the existence area EA on the image.

存在領域EAの大きさは、ノイズ(顔の皺や明暗などを抽出してしまう)の低減や処理速度を落とさないためにも、可能な限り小さい領域が良い。本実施形態では、数人の眼の大きさを調べ、それに余裕分(例えば×1.5倍)を加味して、存在領域EAの大きさを決定している。すなわち、図13及び図14のように、眼の縦横寸法のデータを集め、その分布の例えば95%をカバーする寸法に余裕分を加味して決定している。   The size of the existence area EA is preferably as small as possible in order to reduce noise (extract facial wrinkles, brightness and darkness) and not reduce the processing speed. In this embodiment, the size of the presence area EA is determined by examining the size of the eyes of several people and adding a margin (for example, x1.5). That is, as shown in FIG. 13 and FIG. 14, the data is determined by collecting data on the vertical and horizontal dimensions of the eye and adding a margin to a dimension that covers 95% of the distribution.

そして、存在領域EAの大きさは、図12にも示すように、上記95%をカバーする寸法、すなわち横寸法xa、縦寸法yaに余裕分(×1.5)を加味して決定している。なお、存在領域EAの大きさについては、画像処理により眼の幅や高さを推定し、縦横の大きさに余裕分を加える大きさとしてもよい。   As shown in FIG. 12, the size of the existence area EA is determined by adding a margin (× 1.5) to the dimension covering 95%, that is, the horizontal dimension xa and the vertical dimension ya. Yes. The size of the existence area EA may be a size that estimates the eye width and height by image processing and adds a margin to the vertical and horizontal sizes.

このように存在領域EAの大きさが決定された後、図15に示すように、例えば眼の座標値(x1,y1)を基準に、基準点Pを決める。基準点Pは、眼の座標値(x1,y1)から距離x2,y2だけ離れた位置に定められるものである。   After the size of the existence area EA is determined in this way, as shown in FIG. 15, for example, the reference point P is determined based on the coordinate values (x1, y1) of the eye. The reference point P is determined at a position separated from the eye coordinate values (x1, y1) by distances x2, y2.

そして、マイコン3は、点Pを基準に存在領域EAの寸法x3,y3を描画する。これにより、存在領域EAの位置が決定される。その後、画像全体で見つかった連続データGすべてについて存在領域EAを設定する。   Then, the microcomputer 3 draws the dimensions x3 and y3 of the existence area EA with the point P as a reference. Thereby, the position of the existence area EA is determined. Thereafter, the existence area EA is set for all the continuous data G found in the entire image.

なお、上記のx2及びy2はx3,y3の1/2であって、予め存在領域EAが眼の中心にくるような長さとすることが望ましい。   Note that x2 and y2 are 1/2 of x3 and y3, and it is desirable to set the length so that the existence area EA is at the center of the eye in advance.

以上の図10〜図15の処理により、図9の眼候補位置特定処理(ST31)がなされる。次に、図9に示した眼判定処理(ST32)を説明する。図16は、図9に示した眼判定処理(ST32)の詳細を説明するフローチャートである。   The eye candidate position specifying process (ST31) in FIG. 9 is performed by the processes in FIGS. Next, the eye determination process (ST32) shown in FIG. 9 will be described. FIG. 16 is a flowchart for explaining the details of the eye determination process (ST32) shown in FIG.

まず、マイコン3は、図10の処理にて求められた存在領域EAの画像データを微少画像IGとして画像メモリに保存する(ST50)。全体画像と画像メモリに保存される微小画像IGとの状態を図17に示す。図17は、微小画像を示す説明図である。図13に示すように、マイコン3は、全体画像から存在領域EA内の画像を抽出し、微小画像IGとしている。   First, the microcomputer 3 stores the image data of the existence area EA obtained by the processing of FIG. 10 in the image memory as a minute image IG (ST50). FIG. 17 shows the state of the entire image and the minute image IG stored in the image memory. FIG. 17 is an explanatory diagram showing a minute image. As shown in FIG. 13, the microcomputer 3 extracts an image in the existence area EA from the entire image and forms a minute image IG.

再度、図16を参照して説明する。マイコン3は、全体画像の代表座標値Cを微少画像IGの代表座標値ICとする。そして、マイコン3は、微少画像IGの代表座標値ICを基準とした範囲ARを設定し、範囲ARの濃度情報をもとに二値化閾値を設定する(ST51)。   Again, a description will be given with reference to FIG. The microcomputer 3 sets the representative coordinate value C of the entire image as the representative coordinate value IC of the minute image IG. Then, the microcomputer 3 sets a range AR based on the representative coordinate value IC of the minute image IG, and sets a binarization threshold based on the density information of the range AR (ST51).

範囲ARでの二値化閾値の算出方法の一例を、図18を参照して説明する。図18は、範囲ARでの二値化閾値の算出方法の説明図である。まず、マイコン3は、範囲ARにおいて縦方向に数ラインの濃度値を読み出す。   An example of a binarization threshold calculation method in the range AR will be described with reference to FIG. FIG. 18 is an explanatory diagram of a method of calculating a binarization threshold in the range AR. First, the microcomputer 3 reads density values of several lines in the vertical direction in the range AR.

そして、マイコン3は、各ラインにおいて濃度値の最も高い(明るい)濃度値と、最も低い(暗い)濃度値をメモリしていく。全ラインのメモリが終了したら、マイコン3は、各ラインの最も高い(明るい)濃度値の中で、一番低い濃度値(皮膚の部分)と、各ラインの最も低い(暗い)濃度値の中で、一番低い濃度値(眼の部分)とを求める。そして、その中央値を二値化閾値とする。   The microcomputer 3 stores the highest (bright) density value and the lowest (dark) density value in each line. When the memory of all lines is completed, the microcomputer 3 determines that the lowest density value (skin part) among the highest (lightest) density values of each line and the lowest (darkest) density value of each line. Then, the lowest density value (eye part) is obtained. Then, the median is set as a binarization threshold.

なお、上記した範囲ARは、好適に二値化閾値を決定するため、眼の黒い部分と眼周囲の皮膚の白い部分が入るように設定される。また、範囲ARは、画像の明るさのバラツキによる影響を少なくするために必要最小限の大きさにされる。   Note that the above-mentioned range AR is set so that the black part of the eye and the white part of the skin around the eye enter in order to determine the binarization threshold suitably. The range AR is set to a minimum size necessary for reducing the influence of variations in image brightness.

さらに、二値化閾値は、範囲AR内の眼の一番低い(暗い)濃度値と、皮膚部分の一番低い(暗い)濃度値の中央値とすることで、皮膚の部分から眼の部分を切り出すのに適した値になる。   Furthermore, the binarization threshold is set to the median value of the lowest (dark) density value of the eye within the range AR and the lowest (dark) density value of the skin portion, so that the skin portion to the eye portion are set. The value is suitable for cutting out.

ここで、二値化閾値を決定するのに皮膚部分における一番低い(暗い)濃度値を用いている理由は、次の通りである。例えば、範囲ARの一部に直射光が当たっている場合、皮膚部分は、眼球の黒色部分に比して、光を強く反射する傾向にある。このため、本装置1は、多くのノイズとも言える光を入力してしまうこととなる。   Here, the reason why the lowest (dark) density value in the skin portion is used to determine the binarization threshold is as follows. For example, when direct light hits a part of the range AR, the skin portion tends to reflect light more strongly than the black portion of the eyeball. For this reason, this apparatus 1 will input the light which can be said to be many noises.

この場合、濃度値を読み出す範囲ARを極力小さくしても、画像がノイズ光による影響を受け、本装置1は正確な二値化閾値を決定できなくなってしまう。このため、本実施形態では、強く反射している可能性がある濃度値の高い部分を用いず、皮膚の部分の濃度値の一番低い(暗い)濃度値を用いることで、より適切な二値化閾値を決定できるようにしている。   In this case, even if the range AR from which the density value is read is made as small as possible, the image is affected by noise light, and the apparatus 1 cannot determine an accurate binarization threshold. For this reason, in the present embodiment, by using the lowest (dark) density value of the density value of the skin portion without using the high density value portion that may be strongly reflected, more appropriate two The value threshold can be determined.

再度、図16を参照して説明する。二値化閾値の決定後、マイコン3は、決定した二値化閾値を用いて微少画像IGを二値化処理し、二値画像bGとして画像メモリに保存する(ST52)。   Again, a description will be given with reference to FIG. After determining the binarization threshold, the microcomputer 3 binarizes the minute image IG using the determined binarization threshold, and stores it in the image memory as a binary image bG (ST52).

次に、マイコン3は、全体画像の代表座標値Cを二値画像bGの位置bCとし、この位置bCを初期位置として設定する(ST53)。その後、マイコン3は、設定位置が黒画素か否かを判断する(ST54)。ここでは、まず、ステップST53において設定された初期位置が黒画素か否か判断される。   Next, the microcomputer 3 sets the representative coordinate value C of the entire image as the position bC of the binary image bG, and sets this position bC as the initial position (ST53). Thereafter, the microcomputer 3 determines whether or not the set position is a black pixel (ST54). Here, first, it is determined whether or not the initial position set in step ST53 is a black pixel.

そして、設定位置が黒画素でないと判断した場合(ST54:NO)、マイコン3は、設定位置を上下左右に1画素ずつずらす(ST55)。その後、マイコン3は、ステップST55においてずらされた設定位置が黒画素か否かを判断する。そして、マイコン3は、設定位置が黒画素と判断されるまで、この処理を繰り返す。   If it is determined that the set position is not a black pixel (ST54: NO), the microcomputer 3 shifts the set position up, down, left, and right by one pixel (ST55). Thereafter, the microcomputer 3 determines whether or not the setting position shifted in step ST55 is a black pixel. The microcomputer 3 repeats this process until it is determined that the set position is a black pixel.

一方、設定位置が黒画素であると判断した場合(ST54:YES)、マイコン3は、その黒画素の連結成分を候補オブジェクトとして設定する(ST56)。そして、マイコン3は、候補オブジェクトの幾何形状を算出する(ST57)。   On the other hand, when determining that the set position is a black pixel (ST54: YES), the microcomputer 3 sets the connected component of the black pixel as a candidate object (ST56). Then, the microcomputer 3 calculates the geometric shape of the candidate object (ST57).

算出後、マイコン3は、予め記憶している眼のテンプレートの幾何形状と候補オブジェクトの幾何形状とを比較する(ST58)。候補オブジェクトと眼のテンプレートとの幾何形状の比較方法の一例を、図19を参照して説明する。   After the calculation, the microcomputer 3 compares the geometric shape of the eye template stored in advance with the geometric shape of the candidate object (ST58). An example of a method for comparing the geometric shapes of the candidate object and the eye template will be described with reference to FIG.

図19は、候補オブジェクトと眼のテンプレートとの幾何形状の比較方法の説明図であり、(a)は候補オブジェクトが最適な状態で撮像された場合を示し、(b)は眼の右側が欠けた状態を示し、(c)は眼の左側が欠けた状態を示している。   FIG. 19 is an explanatory diagram of a method for comparing the geometric shapes of a candidate object and an eye template. FIG. 19A shows a case where the candidate object is imaged in an optimal state, and FIG. 19B shows that the right side of the eye is missing. (C) shows a state in which the left side of the eye is missing.

眼の画像を二値化した形状は光環境が良く安定した画像であれば図19(a)に示すようなものになる。ところが、車室内に直射日光が一側から当たる等して光環境が悪化したときには、図19(b)及び(c)に示すように、一部が欠けた形状になることもある。   The binarized shape of the eye image is as shown in FIG. 19A if the light environment is good and the image is stable. However, when the light environment deteriorates due to direct sunlight hitting the vehicle interior from one side, as shown in FIGS. 19B and 19C, a part of the shape may be lost.

マイコン3は、上記のような候補オブジェクトを正確に判断するために、3つの条件により比較判断を行う。まず、条件(i)としては、横幅が眼の相場値の2/3以上あり、且つ上に凸の所定範囲の曲率を持っていることである。次に、条件(ii)としては、黒眼の左側の凹み形状があることである。また、条件(iii)としては、黒眼の右側の凹み形状があることである。   In order to accurately determine the candidate object as described above, the microcomputer 3 performs a comparison determination based on three conditions. First, the condition (i) is that the lateral width is 2/3 or more of the market value of the eye and has an upward convex curvature. Next, the condition (ii) is that there is a concave shape on the left side of the black eye. The condition (iii) is that there is a concave shape on the right side of the black eye.

再度、図16を参照して説明する。幾何形状の比較後、マイコン3は、上記3つの条件に基づき、比較判断を行い、候補オブジェクトと眼テンプレートとの幾何形状が一致するか否かを判断する(ST59)。ここで、図19(b)及び(c)のように眼の形状の一部が欠けている場合を考慮し、マイコン3は、条件(i)及び(ii)を満たすもの、並びに条件(ii)及び(iii)を満たすものを一致すると判断する。   Again, a description will be given with reference to FIG. After comparing the geometric shapes, the microcomputer 3 makes a comparison determination based on the above three conditions, and determines whether the geometric shapes of the candidate object and the eye template match (ST59). Here, considering the case where a part of the eye shape is missing as shown in FIGS. 19B and 19C, the microcomputer 3 satisfies the conditions (i) and (ii) and the condition (ii). ) And (iii) are determined to match.

一致しないと判断した場合(ST59:NO)、マイコン3は、その候補オブジェクトが眼でないと判定し(ST60)、その後、処理は、図9のステップST33に移行する。   If it is determined that they do not match (ST59: NO), the microcomputer 3 determines that the candidate object is not an eye (ST60), and then the process proceeds to step ST33 in FIG.

一方、一致すると判断した場合(ST59:YES)、マイコン3は、その候補オブジェクトを眼であると判定する(ST61)。そして、判定された候補オブジェクトの座標値(全体画像における代表座標値Cに相当する)を、画像上における眼の座標値としてメモリする(ST62)。   On the other hand, if it is determined that they match (ST59: YES), the microcomputer 3 determines that the candidate object is an eye (ST61). Then, the determined coordinate value of the candidate object (corresponding to the representative coordinate value C in the entire image) is stored as the coordinate value of the eye on the image (ST62).

その後、マイコン3は、一致と判断された候補オブジェクトを含む微小画像IGを眼画像MGとして、画像メモリに保存する(ST63)。そして、処理は、図9のステップST33に移行する。 Thereafter, the microcomputer 3 stores the minute image IG including the candidate object determined to be coincident as the eye image MG i in the image memory (ST63). And a process transfers to step ST33 of FIG.

なお、図16の処理では、二値化閾値を用いて二値化した候補オブジェクトを検出している。このため、本実施形態では、眼の部分と他の部分(背景や眼以外の顔部分)とを明確に区別し、眼を正確に捉えることができる。さらには、候補オブジェクトの幾何形状を用いた判定をより正確に行うことができ、眼の位置検出精度をより向上させることができる。   In the process of FIG. 16, a binarized candidate object is detected using a binarization threshold. For this reason, in this embodiment, an eye part and other parts (a background or a face part other than eyes) can be clearly distinguished, and an eye can be grasped correctly. Furthermore, the determination using the geometric shape of the candidate object can be performed more accurately, and the eye position detection accuracy can be further improved.

以上、図11〜図19を参照して説明したように、マイコン3(眼検出手段CL12)は、入力した画像全体から、眼画像を取得することとなる。そして、前述したように、図9のステップST33において、眼画像が取得されている場合、「YES」と判断されて、処理は図8のステップST15に移行することとなる。   As described above with reference to FIGS. 11 to 19, the microcomputer 3 (eye detection means CL <b> 12) acquires an eye image from the entire input image. As described above, if an eye image has been acquired in step ST33 in FIG. 9, the determination is “YES”, and the process proceeds to step ST15 in FIG.

再度、図8を参照する。ステップST15において、マイコン3は、眼画像を取得できたか否かを判断する(ST15)。ここで、眼画像が取得できなかったと判断した場合(ST15:NO)、処理はステップST27に移行する。一方、眼画像が取得できたと判断した場合(ST15:YES)、マイコン3は、上瞼検出処理を実行する(ST16)。この処理において、マイコン3は、上瞼検出手段CL2に相当するプログラムを実行して、眼画像内から上瞼を検出することとなる。   FIG. 8 will be referred to again. In step ST15, the microcomputer 3 determines whether an eye image has been acquired (ST15). If it is determined that an eye image could not be acquired (ST15: NO), the process proceeds to step ST27. On the other hand, if it is determined that an eye image has been acquired (ST15: YES), the microcomputer 3 executes an upper eyelid detection process (ST16). In this process, the microcomputer 3 executes a program corresponding to the upper eyelid detection means CL2 and detects the upper eyelid from the eye image.

ここで、上瞼の検出については、種々の方法がある。マイコン3は、それら方法のうちいずれか1つ以上により、上瞼を検出する。具体例を挙げると、マイコン3は、眼画像について画像縦方向にエッジ検出し、検出されたエッジのうち画像縦方向において上に凸となるものを上瞼として検出する。   Here, there are various methods for detecting the upper eyelid. The microcomputer 3 detects the upper eyelid by any one or more of these methods. As a specific example, the microcomputer 3 detects an edge of the eye image in the vertical direction of the image, and detects an edge that is convex upward in the vertical direction of the image as an upper eyelid.

次いで、マイコン3は、上瞼を検出できたか否かを判断する(ST17)。ここで、上瞼を検出できなかったと判断した場合(ST17:NO)、処理はステップST27に移行する。一方、上瞼を検出できたと判断した場合(ST17:YES)、マイコン3は、上瞼の座標を抽出する(ST18)。この処理において、マイコン3は、上瞼座標抽出手段CL3に相当するプログラムを実行して、上瞼座標群を抽出することとなる。   Next, the microcomputer 3 determines whether or not the upper eyelid has been detected (ST17). If it is determined that the upper eyelid has not been detected (ST17: NO), the process proceeds to step ST27. On the other hand, when it is determined that the upper eyelid has been detected (ST17: YES), the microcomputer 3 extracts the coordinates of the upper eyelid (ST18). In this process, the microcomputer 3 executes a program corresponding to the upper eyelid coordinate extracting means CL3 to extract the upper eyelid coordinate group.

図20は、図8に示した上瞼検出処理(ST16)及び上瞼座標抽出処理(ST18)の詳細な動作を示す説明図であり、(a)は取得された眼画像の一例を示し、(b)は眼画像について画像縦方向にエッジ検出処理を施した画像例を示し、(c)は(b)に示す画像に画像処理を施したときの画像例を示し、(d)は(c)に示す画像に画像処理を施したときの画像例を示している。   FIG. 20 is an explanatory diagram showing detailed operations of the upper eyelid detection process (ST16) and the upper eyelid coordinate extraction process (ST18) shown in FIG. 8, (a) shows an example of the acquired eye image, (B) shows an image example obtained by subjecting an eye image to edge detection processing in the longitudinal direction of the image, (c) shows an example image obtained by performing image processing on the image shown in (b), and (d) shows ( An image example is shown when image processing is performed on the image shown in c).

まず、図20(a)に示すような眼画像が取得された場合、マイコン3は、眼画像縦方向にエッジ検出する。これにより、マイコン3は、図20(b)に示すように、上瞼の上側部分のエッジラインと、上瞼の下側及び黒眼の結合からなるエッジラインとを検出する。   First, when an eye image as shown in FIG. 20A is acquired, the microcomputer 3 detects an edge in the eye image vertical direction. Thereby, as shown in FIG. 20B, the microcomputer 3 detects the edge line of the upper part of the upper eyelid and the edge line formed by combining the lower side of the upper eyelid and the black eye.

ここで、上瞼の上側部分のエッジラインが上に凸であるため、上瞼検出手段CL2は、このエッジラインを上瞼として検出することとなる。次いで、マイコン3は、上瞼の上側部分のエッジラインから、上瞼の座標を抽出する。これにより、マイコン3は、上瞼の座標群を抽出することとなる。   Here, since the edge line of the upper part of the upper eyelid is convex upward, the upper eyelid detection means CL2 detects this edge line as the upper eyelid. Next, the microcomputer 3 extracts the coordinates of the upper eyelid from the edge line of the upper part of the upper eyelid. Thereby, the microcomputer 3 will extract the coordinate group of the upper eyelid.

また、上瞼の上側部分のエッジラインから上瞼の座標を抽出する方法に代えて、以下の方法を採用してもよい。すなわち、マイコン3は、上瞼の下側と黒眼との結合からなるエッジラインについて、不連続点を見つける。不連続点とは、エッジラインを画像横方向(X軸方向)に走査していた場合に、画像縦方向についての座標値(Y値)が増加から減少に転じる点、又は減少から増加に転じる点をいう。   Further, instead of the method of extracting the coordinates of the upper eyelid from the edge line of the upper part of the upper eyelid, the following method may be adopted. That is, the microcomputer 3 finds a discontinuous point with respect to the edge line formed by the combination of the lower side of the upper eyelid and the black eye. A discontinuous point is a point at which the coordinate value (Y value) in the image vertical direction changes from increase to decrease or decreases to increase when the edge line is scanned in the horizontal direction (X-axis direction). Say point.

ここで、上瞼の下側と黒眼との結合からなるエッジラインについては、不連続点は2つとなる。このため、マイコン3は、図20(c)に示すように、2つの不連続点を線で結ぶことにより補完する(図20(c)の補完線1)。これにより、マイコン3は、上瞼の下側部分についてエッジラインを得ることとなる。そして、マイコン3は、上瞼の下側部分のエッジラインから上瞼の座標群を抽出する。   Here, there are two discontinuous points for the edge line formed by the combination of the lower side of the upper eyelid and the black eye. For this reason, the microcomputer 3 complements by connecting two discontinuous points with a line, as shown in FIG. 20C (complement line 1 in FIG. 20C). Thereby, the microcomputer 3 obtains an edge line for the lower part of the upper eyelid. Then, the microcomputer 3 extracts the coordinate group of the upper eyelid from the edge line of the lower part of the upper eyelid.

さらに、マイコン3は、図20(c)に示すように、上瞼の上側エッジラインと下側エッジラインの端部を補完し(図20(c)の補完線2)、図20(d)に示すように、上側エッジラインと下側エッジラインとで閉空間を形成してもよい。この場合、マイコン3は、閉空間を上瞼の領域とし、この空間内の点を上瞼の座標群として抽出することとなる。   Furthermore, as shown in FIG. 20 (c), the microcomputer 3 complements the upper edge line and the lower edge line of the upper collar (complement line 2 in FIG. 20 (c)), and FIG. 20 (d). As shown in FIG. 5, a closed space may be formed by the upper edge line and the lower edge line. In this case, the microcomputer 3 uses the closed space as the upper eyelid region and extracts points in this space as the upper eyelid coordinate group.

以上のようにして、マイコン3は、上瞼を検出して座標群を抽出する。次いで、マイコン3は、上瞼の曲線近似処理を実行する(図8:ST19)。この処理においてマイコン3は、曲線近似手段CL4に相当するプログラムを実行して、上瞼の曲線近似線を得ることとなる。   As described above, the microcomputer 3 detects the upper eyelid and extracts the coordinate group. Next, the microcomputer 3 executes an upper eye curve approximation process (FIG. 8: ST19). In this process, the microcomputer 3 executes a program corresponding to the curve approximation means CL4 and obtains the upper curve approximation line.

次に、曲線近似処理(ST19)について詳細に説明する。マイコン3は、ステップST18において抽出した座標(x,y)の群を、所定の関数f(x,y)=cで表される曲線に近似する。ここで、(x,y)は、眼画像の左上端を原点とした座標系により表されるとする。また、関数f(x,y)=cは、二次以上の多項式で表される。この多項式は、近似された曲線の頂点部分が原点となるように変換された座標系においては、偶数次項のみで構成される式となる。これは、頂点部分が原点となる座標系において奇数次項が含まれる式では、曲線形状の左右対称性や単頂点性が損なわれてしまうためである。   Next, the curve approximation process (ST19) will be described in detail. The microcomputer 3 approximates the group of coordinates (x, y) extracted in step ST18 to a curve represented by a predetermined function f (x, y) = c. Here, (x, y) is represented by a coordinate system with the upper left corner of the eye image as the origin. Further, the function f (x, y) = c is expressed by a second-order or higher polynomial expression. This polynomial is an expression composed only of even-order terms in a coordinate system transformed so that the apex of the approximated curve is the origin. This is because the left-right symmetry and single-vertexity of the curved shape are impaired in an expression including an odd-order term in the coordinate system in which the vertex is the origin.

なお、ここでは、二次曲線のうち計算が容易に行える放物線y=ax2+bx+cに近似を行うとして説明するが、マイコン3は、円、楕円、双曲線といった円錐曲線や、ax+2hxy+by+2gx+2fy+c=0で表される一般の二次曲線や、二次以上の曲線であっても、同様の手順を踏むことによって曲線近似を行うことができることはいうまでもない。 Here, the description will be given on the assumption that the parabola y = ax2 + bx + c that can be easily calculated among the quadratic curve is assumed, but the microcomputer 3 is a conic curve such as a circle, an ellipse, or a hyperbola, or ax 2 + 2hxy + by 2 + 2gx + 2fy + c = 0. It goes without saying that curve approximation can be performed by following the same procedure for a general quadratic curve or a curve of quadratic or higher.

次に、図21を参照する。図21は、曲線近似処理(ST19)の詳細を示すフローチャートである。図21に示すように、マイコン3は座標群を最小二乗法により近似する。すなわち、まず、マイコン3は座標群を構成する各点の座標値(x,y)の総和値を求める(ST70)。このとき、マイコン3は、座標値x、座標値y及び座標値xを二乗した値について、総和を求める。具体的にマイコン3は以下の式により、これらの総和値を求める。
Reference is now made to FIG. FIG. 21 is a flowchart showing details of the curve approximation process (ST19). As shown in FIG. 21, the microcomputer 3 approximates the coordinate group by the method of least squares. That is, first, the microcomputer 3 obtains the total value of the coordinate values (x, y) of each point constituting the coordinate group (ST70). At this time, the microcomputer 3 obtains the sum of the coordinate value x, the coordinate value y, and the value obtained by squaring the coordinate value x. Specifically, the microcomputer 3 obtains the total value of these by the following equation.

その後、マイコン3は、各総和値の平均値を求める(ST72)。具体的にマイコン3は以下の式により、これらの平均値を求める。
Thereafter, the microcomputer 3 obtains an average value of the total values (ST72). Specifically, the microcomputer 3 obtains an average value of these by the following formula.

そして、マイコン3は、求めた平均値から、以下の式により、分散値及び共分散値を求める(ST73)。
And the microcomputer 3 calculates | requires a dispersion value and a covariance value from the calculated | required average value by the following formula | equation (ST73).

その後、マイコン3は、求めた分散値及び共分散値から、以下の式により、回帰係数a,b及び定数項cを求める(ST74)。
Thereafter, the microcomputer 3 obtains the regression coefficients a and b and the constant term c from the obtained variance value and covariance value by the following formula (ST74).

これにより、マイコン3は、エッジラインを放物線y=ax+bx+cに近似する。なお、図21の説明において、マイコン3は、放物線y=ax+bx+cにエッジラインを近似したが、円、楕円、双曲線といった円錐曲線やax+2hxy+by+2Gx+2fy+c=0で表される一般の二次曲線に近似するようにしてもよい。 Thereby, the microcomputer 3 approximates the edge line to a parabola y = ax 2 + bx + c. In the description of FIG. 21, the microcomputer 3 approximates the edge line to a parabola y = ax 2 + bx + c, but a general quadratic curve represented by a conic curve such as a circle, an ellipse, or a hyperbola, or ax 2 + 2hxy + by 2 + 2Gx + 2fy + c = 0. You may make it approximate to a curve.

再度、図8を参照する。曲線近似処理(ST19)の後、マイコン3は、上瞼の曲率算出処理を実行する(ST20)。すなわち、マイコン3は、上瞼曲率検出手段CL7に相当するプログラムを実行して、曲率を検出することとなる。   FIG. 8 will be referred to again. After the curve approximation process (ST19), the microcomputer 3 executes the upper eye curvature calculation process (ST20). That is, the microcomputer 3 executes a program corresponding to the upper curvature detection means CL7 and detects the curvature.

ここで、マイコン3は、上瞼座標抽出手段CL3により抽出された座標群から、上瞼の曲率を検出する。このとき、マイコン3は、上記と同様にして曲線近似線を得て、曲線近似線から曲率Rを検出する。   Here, the microcomputer 3 detects the curvature of the upper eyelid from the coordinate group extracted by the upper eyelid coordinate extracting means CL3. At this time, the microcomputer 3 obtains a curve approximation line in the same manner as described above, and detects the curvature R from the curve approximation line.

ここで、マイコン3が近似曲線線(放物線)から曲率Rを検出する処理の詳細を説明する。まず、曲線近似線が式y=ax+bx+cの式により表される場合、曲率Rは二次項の回帰係数aとなる。また、マイコン3が、エッジラインを円(x−a)+(y−b)=rや楕円(x−a)/rx+(y−b)/ry=1に近似していたとする。このとき、曲率Rは、円の場合、R=1/rとなる。また、楕円場合、
Here, details of a process in which the microcomputer 3 detects the curvature R from the approximate curve line (parabola) will be described. First, when the curve approximation line is expressed by the equation y = ax 2 + bx + c, the curvature R is the regression coefficient a of the quadratic term. Further, the microcomputer 3 approximates the edge line to a circle (x−a) 2 + (y−b) 2 = r or an ellipse (x−a) 2 / rx + (y−b) 2 / ry = 1. To do. At this time, the curvature R is R = 1 / r in the case of a circle. Also, if it is an ellipse,

となる。なお、マイコン3が、エッジラインを放物線、円及び楕円以外に近似した場合については説明を省略する。 It becomes. In addition, description is abbreviate | omitted when the microcomputer 3 approximates an edge line other than a parabola, a circle | round | yen, and an ellipse.

このように、曲率を求めた後、マイコン3は、上瞼の座標群と曲線近似線との相関値を算出する処理を実行する(ST21)。この処理において、マイコン3は、相関値検出手段CL5に相当するプログラムを実行して、相関値を検出することとなる。   Thus, after calculating | requiring a curvature, the microcomputer 3 performs the process which calculates the correlation value of the coordinate group of an upper eyelid, and a curve approximation line (ST21). In this process, the microcomputer 3 executes a program corresponding to the correlation value detection means CL5 to detect the correlation value.

具体的にマイコン3は、上瞼の座標群を構成する各点のY値の総平方和に対する曲線近似線のY値の総平方和の値を求め、この値を相関値として検出する。すなわち、
Specifically, the microcomputer 3 obtains the value of the sum of squares of the Y values of the curve approximation line with respect to the sum of squares of the Y values of the points constituting the upper eye coordinate group, and detects this value as a correlation value. That is,

なる式から相関値を検出する。   The correlation value is detected from the following formula.

その後、マイコン3は、開閉眼判定閾値設定処理を実行する(ST22)。図22は、図8に示した開閉眼判定閾値設定処理(ST22)の詳細を示すフローチャートである。まず、マイコン3は、第1及び第2判定閾値が設定されているか否かを判断する(ST80)。ここで、第1判定閾値とは相関値が基準値より高いときに設定される閾値である。すなわち、図5(b)について言えば、基準値が「0.85」より高いときに設定される曲率半径を「170」とする閾値である。また、第2判定閾値とは相関値が基準値以下のときに設定される閾値である。すなわち、図5(b)について言えば、基準値が「0.85」以下のときに設定される曲率半径を「350」とする閾値である。   Thereafter, the microcomputer 3 executes an opening / closing eye determination threshold value setting process (ST22). FIG. 22 is a flowchart showing details of the open / closed eye determination threshold value setting process (ST22) shown in FIG. First, the microcomputer 3 determines whether or not the first and second determination threshold values are set (ST80). Here, the first determination threshold is a threshold set when the correlation value is higher than the reference value. That is, with regard to FIG. 5B, the threshold value is set to “170” as the curvature radius set when the reference value is higher than “0.85”. The second determination threshold is a threshold set when the correlation value is equal to or less than the reference value. That is, with regard to FIG. 5B, the threshold value is set to “350” as the curvature radius set when the reference value is “0.85” or less.

そして、第1及び第2判定閾値が設定されていないと判断した場合(ST80:NO)、マイコン3は、ステップST81〜ST86に示すように、第1及び第2判定閾値算出処理を実行する。従って、マイコン3は、ステップST80において「NO」と判断されると、第1算出手段CL61及び第2算出手段CL62に相当するプログラムを実行することとなる。   If it is determined that the first and second determination threshold values are not set (ST80: NO), the microcomputer 3 executes first and second determination threshold value calculation processes as shown in steps ST81 to ST86. Accordingly, if “NO” is determined in step ST80, the microcomputer 3 executes programs corresponding to the first calculation means CL61 and the second calculation means CL62.

次いで、マイコン3は、ステップST21にて求められた上瞼の座標群と曲線近似線との相関値が高いか否かを判断する(ST81)。すなわち、マイコン3は相関値が基準値「0.85」よりも高いか否かを判断する。   Next, the microcomputer 3 determines whether or not the correlation value between the upper eyelid coordinate group obtained in step ST21 and the curve approximation line is high (ST81). That is, the microcomputer 3 determines whether or not the correlation value is higher than the reference value “0.85”.

相関値が基準値よりも高い場合(ST81:YES)、マイコン3は上瞼の曲率の値を記憶する(ST82)。すなわち、相関値が基準値よりも高い場合、精度良く上瞼の曲率が求められていると考えられるため、マイコン3は上瞼の曲率の値を記憶する。このとき、マイコン3は、第1サンプリング手段CL611及び第2サンプリング手段CL621に相当するプログラムを実行する。   If the correlation value is higher than the reference value (ST81: YES), the microcomputer 3 stores the value of the curvature of the upper eyelid (ST82). That is, when the correlation value is higher than the reference value, it is considered that the curvature of the upper eyelid is obtained with high accuracy, and the microcomputer 3 stores the value of the curvature of the upper eyelid. At this time, the microcomputer 3 executes programs corresponding to the first sampling means CL611 and the second sampling means CL621.

次いで、マイコン3は上瞼の曲率の値が所定フレーム数分記憶されたか否かを判断する(ST83)。所定フレーム数分記憶されていない場合(ST83:NO)、処理は図8のステップST23に移行する。一方、所定フレーム数分記憶されている場合(ST83:YES)、マイコン3は第1及び第2判定閾値を算出する(ST84)。このとき、マイコン3は、第1代表値算出手段CL612及び第2代表値算出手段CL622に相当するプログラムを実行する。そして、マイコン3は、以下の処理を行う。   Next, the microcomputer 3 determines whether or not the curvature value of the upper eyelid has been stored for a predetermined number of frames (ST83). If the predetermined number of frames are not stored (ST83: NO), the process proceeds to step ST23 in FIG. On the other hand, when the predetermined number of frames are stored (ST83: YES), the microcomputer 3 calculates the first and second determination thresholds (ST84). At this time, the microcomputer 3 executes programs corresponding to the first representative value calculating unit CL612 and the second representative value calculating unit CL622. Then, the microcomputer 3 performs the following processing.

まず、マイコン3は、第1判定閾値を求めるべく、所定フレーム数分記憶した上瞼の曲率から、開眼時の上瞼の曲率の代表値を求める。すなわち、マイコン3は、所定数サンプリングした上瞼の曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを求める。そして、マイコン3は、曲率の代表値を第1の統計的代表値とし、この第1の統計的代表値を開眼時における曲率と認定する。   First, the microcomputer 3 obtains a representative value of the curvature of the upper eyelid when the eye is opened from the curvature of the upper eyelid stored for a predetermined number of frames in order to obtain the first determination threshold value. That is, the microcomputer 3 obtains one of the average value, the median value, and the mode value of the curvature of the curvature of the upper eyelid sampled by a predetermined number. Then, the microcomputer 3 sets the representative value of the curvature as the first statistical representative value, and recognizes the first statistical representative value as the curvature at the time of eye opening.

ここで、一般的に被検出者の眼を撮像した場合、被検出者は約9割以上開眼状態にある。このため、サンプリングされた曲率の平均値、中央値又は最頻値のいずれであっても、開眼時における曲率に近い値となる。よって、マイコン3は、第1の統計的代表値を開眼時における曲率と認定することができる。   Here, in general, when the eyes of the person to be detected are imaged, the person to be detected is in an open state of about 90% or more. For this reason, even if it is any of the average value, median value, or mode value of the sampled curvature, it becomes a value close to the curvature at the time of eye opening. Therefore, the microcomputer 3 can recognize the first statistical representative value as the curvature at the time of eye opening.

次に、マイコン3は、認定した開眼時における上瞼の曲率、及び、予め求めておいた開眼時における上瞼の曲率と閉眼時における上瞼の最大曲率との相関関係から、閉眼時における被検出者個人の上瞼の最大曲率を求める。図23は、被検出者毎の開眼時における上瞼の曲率を示す説明図であり、図24は、開眼時における上瞼の曲率と閉眼時における上瞼の最大曲率との相関関係を示す説明図である。   Next, the microcomputer 3 determines the curvature of the upper eyelid when the eye is closed from the correlation between the curvature of the upper eyelid when the eye is opened and the curvature of the upper eyelid when the eye is opened and the maximum curvature of the upper eyelid when the eye is closed. Find the maximum curvature of the upper arm of the individual. FIG. 23 is an explanatory diagram showing the curvature of the upper eyelid when the eye is opened for each detected person, and FIG. 24 is an explanation showing the correlation between the curvature of the upper eyelid when the eye is opened and the maximum curvature of the upper eyelid when the eye is closed. FIG.

まず、図23に示すように、被検出者A〜Yの25名について開眼時における上瞼の曲率を検出した。このとき、被検出者毎に開眼時における上瞼の曲率は異なるが、曲率半径の値はおおよそ「50」〜「120」の範囲に収まっている。また、これら被検出者について、閉眼時における上瞼の最大曲率(最小曲率半径)を検出した。すると、図24に示すような関係を有することが明らかとなった。すなわち、図24に示すように、開眼時における上瞼の曲率半径と閉眼時における上瞼の最小曲率半径とは、比例関係にあることが明らかとなった。   First, as shown in FIG. 23, the curvature of the upper eyelid at the time of eye opening was detected for 25 persons to be detected A to Y. At this time, the curvature of the upper eyelid at the time of eye opening differs for each detected person, but the value of the radius of curvature is approximately in the range of “50” to “120”. Moreover, the maximum curvature (minimum curvature radius) of the upper eyelid when these eyes were closed was detected for these subjects. Then, it became clear that it has a relationship as shown in FIG. That is, as shown in FIG. 24, it has been clarified that the curvature radius of the upper eyelid when the eye is open and the minimum curvature radius of the upper eyelid when the eye is closed are in a proportional relationship.

このため、マイコン3は、開眼時における上瞼の曲率と認定された第1の統計的代表値を、相関関係に当てはめることで、閉眼時における被検出者個人の上瞼の最大曲率を求めることができる。そして、マイコン3はこの最大曲率を第1判定閾値として算出する。   For this reason, the microcomputer 3 obtains the maximum curvature of the upper eyelid of the individual to be detected when the eyes are closed by applying the first statistical representative value recognized as the curvature of the upper eyelid at the time of eye opening to the correlation. Can do. The microcomputer 3 calculates this maximum curvature as the first determination threshold value.

このように、マイコン3は、上瞼の曲率を所定フレーム数(所定数)記憶(サンプリング)して、被検出者個人の閉眼時における上瞼の最大曲率を求める。ここで、閉眼時における上瞼の最大曲率とは、言い換えれば、開眼時における上瞼の最小曲率とも言える。このため、閉眼時における上瞼の最大曲率とは、開眼と閉眼との判定が分かれる曲率とも言える。よって、第1判定閾値は、開眼と閉眼との境界を示す値となり、開閉眼判定をするにあたって適した値となる。   As described above, the microcomputer 3 stores (samples) the curvature of the upper eyelid for a predetermined number of frames (predetermined number) and obtains the maximum curvature of the upper eyelid when the individual to be detected is closed. Here, the maximum curvature of the upper eyelid when the eye is closed can be said to be the minimum curvature of the upper eyelid when the eye is opened. For this reason, it can be said that the maximum curvature of the upper eyelid when the eye is closed is a curvature in which the determination of the open eye and the closed eye is divided. Therefore, the first determination threshold value is a value indicating the boundary between open eyes and closed eyes, and is a value suitable for performing open / closed eye determination.

なお、図24では一部の被検出者について曲率半径を図示し、他の被検出者について曲率半径の図示を省略している。   In FIG. 24, the radius of curvature is illustrated for some detected persons, and the radius of curvature is omitted for other detected persons.

次に、マイコン3は、第2判定閾値を算出する。第2判定閾値を算出するにあたり、まず、マイコン3は、サンプリングされた所定数の曲率から、平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求める。その後、マイコン3は、上瞼の曲率について再度サンプリングする。   Next, the microcomputer 3 calculates a second determination threshold value. In calculating the second determination threshold, first, the microcomputer 3 obtains one of an average value, a median value, and a mode value as the second statistical representative value from a predetermined number of sampled curvatures. Thereafter, the microcomputer 3 samples again the curvature of the upper eyelid.

そして、マイコン3は、再度サンプリングされた所定数の曲率のうち、算出しておいた第2の統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第3の統計的代表値として求める。すなわち、マイコン3は、上瞼の曲率が所定数記憶されると第2の統計的代表値を求め、さらに上瞼の曲率が所定数記憶されると第3の統計的代表値を求めることとなる。そして、マイコン3は、このサンプリングと統計的代表値の算出とをN回(Nは2以上の整数)繰り替えす(すなわち、第2判定閾値を算出するには、ステップST81〜ST86の処理を複数回繰り返す必要がある)。   The microcomputer 3 then selects one of the average value, the median value, and the mode value of the curvature for the curvature smaller than the calculated second statistical representative value among the predetermined number of curvatures sampled again. Is determined as a third statistical representative value. That is, the microcomputer 3 obtains a second statistical representative value when a predetermined number of curvatures of the upper eyelid are stored, and further obtains a third statistical representative value when a predetermined number of curvatures of the upper eyelid are stored. Become. Then, the microcomputer 3 repeats the sampling and the calculation of the statistical representative value N times (N is an integer equal to or greater than 2) (that is, in order to calculate the second determination threshold value, a plurality of processes of steps ST81 to ST86 are performed. Must be repeated).

上記動作についてまとめると、マイコン3は、1回目にサンプリングされた所定数の曲率から、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求める。そして、マイコン3は、n回目(nは2以上N以下の整数)にサンプリングされた所定数の曲率のうち、n−1回目に求めた第nの統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第n+1の統計的代表値として求めることとなる。その後、マイコン3は、求めた第N+1の統計的代表値を第2判定閾値とする。   Summarizing the above operation, the microcomputer 3 obtains one of the average value, median value, and mode value of the curvature as the second statistical representative value from the predetermined number of curvatures sampled at the first time. Then, the microcomputer 3 calculates the curvature for a curvature smaller than the nth statistical representative value obtained for the (n-1) th time out of a predetermined number of curvatures sampled at the nth time (n is an integer of 2 or more and N or less). Any one of the average value, the median value, and the mode value is obtained as the (n + 1) th statistical representative value. Thereafter, the microcomputer 3 sets the obtained N + 1-th statistical representative value as the second determination threshold value.

ここで、一般的に被検出者の眼を撮像した場合、被検出者は約9割以上開眼状態にあるため、サンプリングされた曲率の平均値、中央値又は最頻値のいずれであっても、開眼時における曲率に近い値となる。よって、再度サンプリングした曲率のうち、第2統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第3統計的代表値として求めることで、開眼時の曲率の多くを除いて平均値、中央値又は最頻値を求めることとなる。そして、これらを繰り返すことで、一層開眼時の曲率の多くを除いて平均値、中央値又は最頻値を求めることとなる。   Here, in general, when the eye of the person to be detected is imaged, since the person to be detected is in an open state of about 90% or more, any of the average value, median value, or mode value of the sampled curvature may be used. It becomes a value close to the curvature at the time of eye opening. Therefore, among the curvatures sampled again, for any curvature smaller than the second statistical representative value, any one of the average value, median value, or mode value of the curvature is obtained as the third statistical representative value. The average value, median value, or mode value is obtained excluding most of the curvature at the time. Then, by repeating these steps, the average value, median value, or mode value is obtained by removing much of the curvature when the eye is further opened.

故に、開眼時の曲率が多く除かれた曲率から平均値、中央値又は最頻値を求めることで、これらの値を閉眼時の曲率に近い値とすることができる。すなわち、開眼を誤って閉眼と判定しないように、第2判定閾値を小さい値(曲率半径を基準とすると高い値)とすることとができる。しかも、現在の運転者の眼の曲率をサンプリングしているため、現在の運転者にとって適切な範囲内で、第2判定閾値を小さくすることが可能となる。   Therefore, by obtaining an average value, a median value, or a mode value from the curvature obtained by removing a large amount of curvature when the eyes are opened, these values can be made close to the curvature when the eyes are closed. That is, the second determination threshold value can be set to a small value (a high value based on the radius of curvature) so that the eyes are not erroneously determined to be closed. Moreover, since the curvature of the current driver's eye is sampled, the second determination threshold can be reduced within a range appropriate for the current driver.

なお、図7に示すように、第2判定閾値を曲率半径「350」などの値にして、開眼時に誤って閉眼と判定することがないように確実を期するためには、被検出者の撮影角度や用いられるシステムなどに合わせて、上記繰り返し回数Nを適切に設定すればよい。また、マイコン3は、第2統計的代表値を求めた後、再度サンプリングすることなく(すなわちST81〜ST86の処理をN回繰り返すのではなく)、既に記憶してある所定数の上瞼の曲率を対象に、統計的代表値の算出を繰り返し、第N+1の統計的代表値を求めるようにしてもよい。   As shown in FIG. 7, in order to ensure that the second determination threshold value is a value such as a curvature radius “350” so that the eyes are not erroneously determined to be closed when the eyes are opened, The number of repetitions N may be set appropriately in accordance with the shooting angle, the system used, and the like. Further, after obtaining the second statistical representative value, the microcomputer 3 does not sample again (that is, does not repeat the processing of ST81 to ST86 N times), and has a predetermined number of upper curvatures that are already stored. For example, the calculation of the statistical representative value may be repeated to obtain the (N + 1) th statistical representative value.

また、第2判定閾値については、以下のように算出されてもよい。すなわち、マイコン3は、上瞼の曲率を所定数サンプリングし、サンプリングした所定数の曲率のうち、先に算出された第1判定閾値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求める。そして、マイコン3は、求めた第2の統計的代表値を第2判定閾値とする。   In addition, the second determination threshold value may be calculated as follows. That is, the microcomputer 3 samples a predetermined number of curvatures of the upper eyelid, and among the sampled number of curvatures sampled, for the curvature smaller than the first determination threshold value calculated earlier, the average value, median value, or mode of curvature One of the values is determined as the second statistical representative value. Then, the microcomputer 3 uses the obtained second statistical representative value as the second determination threshold value.

ここで、開眼時に誤って閉眼と判定してしまう可能性を減じるためには、第2判定閾値が少なくとも第1判定閾値よりも小さくなければならない。すなわち、図7に示すように、曲率半径を基準にして考えると、第2判定閾値が少なくとも第1判定閾値よりも大きくなければ、開眼時に誤って閉眼と判定してしまう可能性を減じることにならない。ところが、上記の方法によれば、第2判定閾値は必ず第1判定閾値よりも小さくなり、開眼時に誤って閉眼と判定してしまう可能性を減じることができる。さらには、複数回にわたってサンプリングすることなく、且つ、繰り返す回数(上記Nの数)について適切に設定する必要がない。   Here, in order to reduce the possibility of erroneously determining that the eyes are closed when the eyes are opened, the second determination threshold must be at least smaller than the first determination threshold. That is, as shown in FIG. 7, when the curvature radius is considered as a reference, if the second determination threshold value is not at least larger than the first determination threshold value, the possibility of erroneously determining that the eye is closed at the time of opening the eye is reduced. Don't be. However, according to the above method, the second determination threshold value is always smaller than the first determination threshold value, and the possibility of erroneously determining that the eyes are closed when the eyes are opened can be reduced. Furthermore, it is not necessary to set the number of repetitions (the number of N) appropriately without sampling multiple times.

再度、図22を参照する。上記の如く、第1及び第2判定閾値を算出した後、マイコン3は、第1判定閾値をメモリ等に設定する(ST85)。次いで、マイコン3は第2判定閾値をメモリ等に設定する(ST86)。そして、処理は図8のステップST23に移行することとなる。   Reference is again made to FIG. As described above, after calculating the first and second determination thresholds, the microcomputer 3 sets the first determination threshold in a memory or the like (ST85). Next, the microcomputer 3 sets the second determination threshold value in a memory or the like (ST86). And a process will transfer to step ST23 of FIG.

ところで、ステップST80において、第1及び第2判定閾値が設定されていると判断した場合(ST80:YES)、マイコン3は、上瞼の座標群と曲線近似線との相関値が高いか否かを判断する(ST87)。すなわち、マイコン3は相関値が基準値よりも高いか否かを判断する。   By the way, when it is determined in step ST80 that the first and second determination threshold values are set (ST80: YES), the microcomputer 3 determines whether or not the correlation value between the upper eyelid coordinate group and the curve approximation line is high. Is determined (ST87). That is, the microcomputer 3 determines whether or not the correlation value is higher than the reference value.

そして、相関値が基準値よりも高い場合(ST81:YES)、マイコン3は、第1判定閾値を開閉眼判定閾値として設定する(ST88)。そして、処理は図8のステップST23に移行する。また、相関値が基準値よりも高くない場合(ST81:NO)、マイコン3は、第2判定閾値を開閉眼判定閾値として設定し(ST89)、処理は図8のステップST23に移行する。   If the correlation value is higher than the reference value (ST81: YES), the microcomputer 3 sets the first determination threshold as the opening / closing eye determination threshold (ST88). And a process transfers to step ST23 of FIG. If the correlation value is not higher than the reference value (ST81: NO), the microcomputer 3 sets the second determination threshold as the open / close eye determination threshold (ST89), and the process proceeds to step ST23 in FIG.

再度、図8を参照する。上記の如く、開閉眼判定閾値設定処理(ST22)の終了後、マイコン3は、開閉眼判定閾値が決定しているか否かを判断する(ST23)。ここで、図22に示したステップST81〜ST86のみの処理が実行され、図22に示したステップST88又はST89の処理が実行されていなければ、マイコン3は、開閉眼判定閾値が決定していないと判断し(ST23:NO)、処理はステップST27に移行する。   FIG. 8 will be referred to again. As described above, after the opening / closing eye determination threshold value setting process (ST22) ends, the microcomputer 3 determines whether or not the opening / closing eye determination threshold value has been determined (ST23). Here, if only the processing of steps ST81 to ST86 shown in FIG. 22 is executed and the processing of step ST88 or ST89 shown in FIG. 22 is not executed, the microcomputer 3 has not determined the opening / closing eye determination threshold value. (ST23: NO), the process proceeds to step ST27.

一方、図22に示したステップST88又はST89の処理が実行されていれば、マイコン3は、開閉眼判定閾値が決定していると判断し(ST23:YES)、上瞼の曲率が開閉眼判定閾値以上か否かを判断する(ST24)。このとき、マイコン3は、開閉眼判定手段CL8に相当するプログラムを実行する。   On the other hand, if the process of step ST88 or ST89 shown in FIG. 22 is executed, the microcomputer 3 determines that the opening / closing eye determination threshold has been determined (ST23: YES), and the curvature of the upper eyelid determines the opening / closing eye determination. It is determined whether or not the threshold value is exceeded (ST24). At this time, the microcomputer 3 executes a program corresponding to the open / close eye determination means CL8.

そして、上瞼の曲率が開閉眼判定閾値以上であると判断した場合(ST24:YES)、マイコン3は、運転者が開眼状態であると判定する(ST25)。その後、処理はステップST27に移行する。一方、上瞼の曲率が開閉眼判定閾値以上でないと判断した場合(ST24:NO)、マイコン3は、運転者が閉眼状態であると判定する(ST26)。その後、処理はステップST27に移行する。   If it is determined that the curvature of the upper eyelid is greater than or equal to the opening / closing eye determination threshold (ST24: YES), the microcomputer 3 determines that the driver is in the open state (ST25). Thereafter, the process proceeds to step ST27. On the other hand, when it is determined that the curvature of the upper eyelid is not equal to or greater than the opening / closing eye determination threshold value (ST24: NO), the microcomputer 3 determines that the driver is in the closed eye state (ST26). Thereafter, the process proceeds to step ST27.

ステップST27においてマイコン3は、処理フレームカウンタ「i」をインクリメントする(ST27)。その後、処理は、ステップST12に戻り、例えばエンジンが起動されていないと判断され、「STOP」であると判断されるまで、上記の処理が繰り返されることとなる。   In step ST27, the microcomputer 3 increments the processing frame counter “i” (ST27). Thereafter, the process returns to step ST12, and for example, it is determined that the engine is not started, and the above-described process is repeated until it is determined that it is “STOP”.

このようにして、開閉眼判定装置1は、上瞼の座標群とこの座標群に近似された二次以上の曲線との相関値を求めている。ここで、相関値が高い場合とは、眼の周りにノイズが少ないなどの事情により、開閉眼について正確に判定し易い状態であることを示している。他方、相関値が低い場合、眼の周りにノイズが多いなどの事情により、開閉眼について誤判定し易い状態であることを示している。   In this way, the open / closed eye determination device 1 obtains a correlation value between the upper eyelid coordinate group and a quadratic or higher curve approximated to the coordinate group. Here, the case where the correlation value is high indicates that it is easy to accurately determine the open / closed eye due to circumstances such as little noise around the eye. On the other hand, when the correlation value is low, it indicates that it is easy to make an erroneous determination with respect to the open / closed eye due to a lot of noise around the eye.

また、相関値が基準値よりも高い場合、基準値以下の場合よりも、開閉眼判定閾値を大きく設定している。このため、相関値が基準値よりも高い場合、すなわち開閉眼について正確に判定し易い場合には、開閉眼判定閾値を大きくすることとなる。一方、相関値が基準値以下である場合、すなわち開閉眼について誤判定し易い場合には、開閉眼判定閾値を小さくすることとなる。   In addition, when the correlation value is higher than the reference value, the open / close eye determination threshold is set larger than when the correlation value is equal to or lower than the reference value. For this reason, when the correlation value is higher than the reference value, that is, when it is easy to accurately determine the open / closed eye, the open / closed eye determination threshold value is increased. On the other hand, when the correlation value is less than or equal to the reference value, that is, when it is easy to make an erroneous determination for the open / closed eye, the open / closed eye determination threshold value is decreased.

また、上瞼の曲率を求めて、この曲率が開閉眼判定閾値より大きいときに開眼と判定し、開閉眼判定閾値以下のときに、閉眼と判定するようにしている。ここで、眼の回りにノイズが多いなどの場合には、上瞼の曲率についても検出の精度が落ちる。すなわち、上記相関値が小さい場合には、上瞼の曲率についても検出の精度が落ちる。このため、開眼時にあっては上瞼の曲率を小さく検出してしまうことがある。ところが、本実施形態では、相関値が基準値以下の場合、開閉眼判定閾値を小さくしている。故に、開眼時に上瞼の曲率を小さく検出してしまっても、開閉眼判定閾値を小さくしているため、開眼時に閉眼と誤判定してしまう可能性を減じることができる。   Further, the curvature of the upper eyelid is obtained, and it is determined that the eye is open when the curvature is larger than the open / closed eye determination threshold, and the closed eye is determined when the curvature is equal to or less than the open / closed eye determination threshold. Here, when there is a lot of noise around the eyes, the accuracy of detection of the curvature of the upper eyelid also decreases. That is, when the correlation value is small, the accuracy of detection also decreases for the curvature of the upper eyelid. For this reason, when the eye is opened, the curvature of the upper eyelid may be detected small. However, in this embodiment, when the correlation value is less than or equal to the reference value, the open / close eye determination threshold value is reduced. Therefore, even if the curvature of the upper eyelid is detected to be small when the eye is opened, the open / close eye determination threshold value is made small, so that the possibility of erroneously determining that the eye is closed when the eye is opened can be reduced.

従って、開眼時に閉眼であると誤判定しないようにすることができる。   Therefore, it is possible to prevent erroneous determination that the eyes are closed when the eyes are opened.

また、サンプリングされた曲率の平均値、中央値又は最頻値のいずれか1つを第1の統計的代表値として求め、第1の統計的代表値を開眼時における曲率と認定している。ここで、一般的に被検出者の眼を撮像した場合、被検出者は約9割以上開眼状態にある。このため、サンプリングされた曲率の平均値、中央値又は最頻値のいずれであっても、開眼時における曲率に近い値となる。よって、開眼時における曲率を認定することができる。   Also, any one of the average value, median value, and mode value of the sampled curvature is obtained as the first statistical representative value, and the first statistical representative value is recognized as the curvature at the time of eye opening. Here, in general, when the eyes of the person to be detected are imaged, the person to be detected is in an open state of about 90% or more. For this reason, even if it is any of the average value, median value, or mode value of the sampled curvature, it becomes a value close to the curvature at the time of eye opening. Therefore, the curvature at the time of eye opening can be recognized.

また、認定した開眼時における上瞼の曲率、及び、予め求めておいた開眼時における上瞼の曲率と閉眼時における上瞼の最大曲率との相関関係から、閉眼時における被検出者個人の上瞼の最大曲率を求めている。そして、この最大曲率を第1判定閾値として算出している。すなわち、開眼時における上瞼の曲率から、被検出者個人の閉眼時における上瞼の最大曲率を求めている。   In addition, the upper eyelid curvature when the eyes are opened and the correlation between the curvature of the upper eyelids when the eyes are opened and the maximum curvature of the upper eyelids when the eyes are closed are determined in advance. The maximum curvature of the kite is being sought. The maximum curvature is calculated as the first determination threshold value. That is, from the curvature of the upper eyelid when the eye is open, the maximum curvature of the upper eyelid when the individual to be detected is closed is obtained.

このように、本実施形態では、上瞼の曲率をサンプリングして、被検出者個人の閉眼時における上瞼の最大曲率を求めることができる。ここで、被検出者個人の閉眼時における上瞼の最大曲率とは、言い換えれば、被検出者個人の開眼時における上瞼の最小曲率とも言える。すなわち、被検出者個人の閉眼時における上瞼の最大曲率とは、現在の被検出者にとって開眼と閉眼との判定が分かれる曲率とも言える。よって、第1判定閾値は、開閉眼判定をするにあたって適した値となる。   Thus, in this embodiment, the curvature of the upper eyelid can be sampled to obtain the maximum curvature of the upper eyelid when the individual to be detected is closed. Here, the maximum curvature of the upper eyelid when the individual to be detected is closed is, in other words, the minimum curvature of the upper eyelid when the individual to be detected is opened. That is, it can be said that the maximum curvature of the upper eyelid when the individual to be detected is closed is a curvature at which the determination of opening and closing of eyes is divided for the current detected person. Therefore, the first determination threshold value is a value suitable for the open / close eye determination.

従って、開閉眼判定するにあたり、被検出者毎に適切な閾値を設定することができる。   Therefore, an appropriate threshold value can be set for each person to be detected when determining the open / closed eye.

また、サンプリングをN回繰り返し、1回目にサンプリングされた曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求め、N回目にサンプリングした曲率については、第Nの統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第N+1統計的代表値として求め、この第N+1の統計的代表値を第2判定閾値としている。   Also, sampling is repeated N times, and for the curvature sampled at the first time, one of the average value, median value, or mode value of the curvature is obtained as the second statistical representative value, and the curvature sampled at the Nth time. For the curvature smaller than the Nth statistical representative value, any one of the average value, median value, or mode value of the curvature is obtained as the N + 1 statistical representative value, and this N + 1th statistical representative value is obtained. Is the second determination threshold.

ここで、一般的に被検出者の眼を撮像した場合、被検出者は約9割以上開眼状態にある。このため、サンプリングされた曲率の平均値、中央値又は最頻値のいずれであっても、開眼時における曲率に近い値となる。よって、再度サンプリングした曲率のうち、第2統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第3統計的代表値として求めることで、開眼時の曲率の多くを除いて平均値、中央値又は最頻値を求めることとなる。そして、これらを繰り返すことで、一層開眼時の曲率の多くを除いて平均値、中央値又は最頻値を求めることとなる。   Here, in general, when the eyes of the person to be detected are imaged, the person to be detected is in an open state of about 90% or more. For this reason, even if it is any of the average value, median value, or mode value of the sampled curvature, it becomes a value close to the curvature at the time of eye opening. Therefore, among the curvatures sampled again, for any curvature smaller than the second statistical representative value, any one of the average value, median value, or mode value of the curvature is obtained as the third statistical representative value. The average value, median value, or mode value is obtained excluding most of the curvature at the time. Then, by repeating these steps, an average value, median value, or mode value is obtained by removing much of the curvature when the eye is further opened.

故に、開眼時の曲率が多く除かれた曲率から平均値、中央値又は最頻値を求めることで、これらの値を小さくすることができる。すなわち、開眼を誤って閉眼と判定しないように、第2判定閾値を小さい値(曲率半径を基準とすると高い値)とすることとができる。しかも、現在の運転者の眼の曲率をサンプリングしているため、現在の運転者にとって適切な範囲内で、第2判定閾値を小さくすることが可能となる。   Therefore, these values can be reduced by obtaining an average value, median value, or mode value from the curvature obtained by removing a large amount of curvature at the time of eye opening. That is, the second determination threshold value can be set to a small value (a high value based on the radius of curvature) so that the eyes are not erroneously determined to be closed. Moreover, since the curvature of the current driver's eye is sampled, the second determination threshold can be reduced within a range appropriate for the current driver.

従って、開閉眼判定するにあたり、被検出者毎に適切な閾値を設定することが可能となる。   Therefore, it is possible to set an appropriate threshold value for each person to be detected when determining the open / closed eye.

ここで、開眼時に誤って閉眼と判定してしまう可能性を減じるためには、第2判定閾値が少なくとも第1判定閾値よりも小さくなければならない。すなわち、曲率半径を基準にして考えると、第2判定閾値が少なくとも第1判定閾値よりも大きくなければ、開眼時に誤って閉眼と判定してしまう可能性を減じることにならない。このため、上瞼の曲率を所定数サンプリングし、サンプリングした所定数の曲率のうち、先に算出された第1判定閾値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求める。そして、求めた第2の統計的代表値を第2判定閾値とする。   Here, in order to reduce the possibility of erroneously determining that the eyes are closed when the eyes are opened, the second determination threshold must be at least smaller than the first determination threshold. That is, when considering the radius of curvature as a reference, if the second determination threshold value is not at least larger than the first determination threshold value, the possibility that the eye is erroneously determined to be closed at the time of eye opening will not be reduced. For this reason, a predetermined number of curvatures of the upper eyelid are sampled, and among the predetermined number of curvatures sampled, any one of the average value, median value, or mode value of the curvature is smaller than the previously calculated first determination threshold value. One of them is obtained as the second statistical representative value. Then, the obtained second statistical representative value is set as a second determination threshold value.

このようにすれば、第2判定閾値は必ず第1判定閾値よりも小さくなり、開眼時に誤って閉眼と判定してしまう可能性を確実に減じることができる。さらには、複数回にわたってサンプリングする必要がなく、且つ、繰り返す回数(上記Nの数)について適切に設定する必要がない。   In this way, the second determination threshold value is always smaller than the first determination threshold value, and it is possible to reliably reduce the possibility of erroneously determining that the eyes are closed when the eyes are opened. Furthermore, it is not necessary to sample a plurality of times, and it is not necessary to appropriately set the number of repetitions (the number N).

従って、簡易に、開眼時に閉眼であると誤判定しないようにすることができる。   Therefore, it can be easily prevented from erroneously determining that the eyes are closed when the eyes are opened.

また、被検出者の顔全体を撮像した顔画像から被検出者の眼を検出して、顔画像よりも小さくされた微小画像を眼画像として取得している。このため、後の上瞼の曲率検出などにおいても、微小な眼画像を対象に処理していくこととなり、顔画像全体から上瞼を検出する場合に比して、開閉眼を精度良く判定することができる。従って、開閉眼の判定精度を向上させることができる。   Further, the eye of the detected person is detected from the face image obtained by capturing the entire face of the detected person, and a minute image smaller than the face image is acquired as an eye image. For this reason, even in the detection of the curvature of the upper eyelid later, a minute eye image is processed, and the opening / closing eye is determined more accurately than when detecting the upper eyelid from the entire face image. be able to. Therefore, the open / closed eye determination accuracy can be improved.

以上、実施形態に基づき本発明を説明したが、本発明は上記実施形態に限られるものではなく、各実施形態を組み合わせてもよい。また、本発明の趣旨を逸脱しない範囲で、変更を加えてもよい。本発明の趣旨を逸脱しない範囲で、変更を加えてもよい。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not restricted to the said embodiment, You may combine each embodiment. Moreover, you may add a change in the range which does not deviate from the meaning of this invention. Changes may be made without departing from the spirit of the present invention.

例えば、本実施形態では、第1及び第2判定閾値を求めていたが、特に2つに限らず、3段階以上に閾値を設定してもよい。さらには、図25及び図26に示すようにしてもよい。   For example, in the present embodiment, the first and second determination threshold values are obtained. However, the threshold values are not limited to two and may be set in three or more stages. Further, it may be as shown in FIG. 25 and FIG.

図25は閾値及び開閉眼の分布状況を示す説明図であり、図26は閾値の説明図である。同図に示すように、相関値が例えば「0.6」〜「0.85」の区間において閾値は一定値でなく一次式により表されるようにしてもよい。このような一次式を求める場合、マイコン3は、例えば、相関値「0.60」〜「0.61」の区間において得られた上瞼の曲率について、平均値、中央値又は最頻値を求め記憶する。また、マイコン3は、相関値「0.61」以上の区間においても同様に約「0.01」ずつの間隔で平均値、中央値又は最頻値を求め記憶していく。そして、得られた250個の値から近似線を求めることにより、一次式を求める。   FIG. 25 is an explanatory diagram showing the threshold and the distribution status of the open / closed eyes, and FIG. 26 is an explanatory diagram of the threshold. As shown in the figure, the threshold value may be expressed by a linear expression instead of a constant value in a section where the correlation value is “0.6” to “0.85”, for example. When obtaining such a linear expression, the microcomputer 3 calculates, for example, an average value, a median value, or a mode value for the curvature of the upper eyelid obtained in the section of the correlation values “0.60” to “0.61”. Seek and remember. Further, the microcomputer 3 similarly obtains and stores the average value, the median value, or the mode value at intervals of about “0.01” in the interval of the correlation value “0.61” or more. Then, a linear expression is obtained by obtaining an approximate line from the obtained 250 values.

本発明の実施形態に係る開閉眼判定装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the opening-and-closing eye determination apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る開閉眼判定装置1のハード構成図である。It is a hardware block diagram of the opening-and-closing eye determination apparatus 1 which concerns on embodiment of this invention. 顔画像取得手段CL11の他の例を示すハード構成図である。It is a hardware block diagram which shows the other example of the face image acquisition means CL11. 上瞼の様子を示す説明図であり、(a)は眼の周りにノイズが少ない場合の例を示し、(b)は眼の周りにノイズが多い場合の例を示している。It is explanatory drawing which shows the mode of an upper eyelid, (a) shows the example when there is little noise around eyes, (b) shows the example when there is much noise around eyes. 上瞼の曲率半径と相関値との関係を示す説明図であり、(a)は眼の周りにノイズが少ない場合の例を示し、(b)は眼の周りにノイズが多い場合の例を示している。It is explanatory drawing which shows the relationship between the curvature radius of an upper eyelid, and a correlation value, (a) shows the example when there is little noise around an eye, (b) shows the example when there is much noise around an eye. Show. 基準値の説明図である。It is explanatory drawing of a reference value. 開閉眼判定閾値の説明図である。It is explanatory drawing of an opening-and-closing eye determination threshold value. 第1実施形態に係る開閉眼判定装置1の動作の概略を示すメインフローチャートである。It is a main flowchart which shows the outline of operation | movement of the opening-and-closing eye determination apparatus 1 which concerns on 1st Embodiment. 図8に示した眼画像取得処理(ST14)の詳細な動作を示すフローチャートである。It is a flowchart which shows the detailed operation | movement of the eye image acquisition process (ST14) shown in FIG. 図9に示した眼候補位置特定処理(ST31)の詳細を示すフローチャートである。10 is a flowchart showing details of eye candidate position specifying processing (ST31) shown in FIG. 図10に示したステップST46の処理にて形成される連続データ、並びにステップST37の処理にて定められる代表座標値C及び存在領域EAを示す説明図である。It is explanatory drawing which shows the continuous data formed by the process of step ST46 shown in FIG. 10, and the representative coordinate value C and presence area EA which are defined by the process of step ST37. 図11に示した存在領域EAの大きさを示す説明図であり、It is explanatory drawing which shows the magnitude | size of the presence area EA shown in FIG. 数人の眼の大きさを調べた横Xaの長さの統計データを示す説明図である。It is explanatory drawing which shows the statistical data of the length of the horizontal Xa which investigated the magnitude | size of several people's eyes. 数人の眼の大きさを調べた縦Yaの長さの統計データを示す説明図である。It is explanatory drawing which shows the statistical data of the length of length Ya which investigated the magnitude | size of several people's eyes. 存在領域EAの画像上の位置を決定する方法を示す説明図である。It is explanatory drawing which shows the method of determining the position on the image of presence area EA. 図9に示した眼判定処理(ST32)の詳細を説明するフローチャートである。10 is a flowchart for explaining details of an eye determination process (ST32) shown in FIG. 微小画像を示す説明図である。It is explanatory drawing which shows a micro image. 範囲ARでの二値化閾値の算出方法の説明図である。It is explanatory drawing of the calculation method of the binarization threshold value in the range AR. 候補オブジェクトと眼のテンプレートとの幾何形状の比較方法の説明図であり、(a)は候補オブジェクトが最適な状態で撮像された場合を示し、(b)は眼の右側が欠けた状態を示し、(c)は眼の左側が欠けた状態を示している。It is explanatory drawing of the comparison method of the geometric shape of a candidate object and an eye template, (a) shows the case where a candidate object was imaged in the optimal state, (b) shows the state where the right side of the eye was missing. , (C) shows a state where the left side of the eye is missing. 図8に示した上瞼座標抽出処理(ST18)の詳細な動作を示す説明図であり、(a)は取得された眼画像の一例を示し、(b)は眼画像について画像縦方向にエッジ検出処理を施した画像例を示し、(c)は(b)に示す画像に画像処理を施したときの画像例を示し、(d)は(c)に示す画像に画像処理を施したときの画像例を示している。It is explanatory drawing which shows the detailed operation | movement of the upper eyelid coordinate extraction process (ST18) shown in FIG. 8, (a) shows an example of the acquired eye image, (b) is an edge in an image vertical direction about an eye image (C) shows an image example when the image processing is performed on the image shown in (b), and (d) shows a case where the image processing is performed on the image shown in (c). An example of the image is shown. 曲線近似処理(ST19)の詳細を示すフローチャートである。It is a flowchart which shows the detail of a curve approximation process (ST19). 図8に示した開閉眼判定閾値設定処理(ST22)の詳細を示すフローチャートである。It is a flowchart which shows the detail of the opening-and-closing eye determination threshold value setting process (ST22) shown in FIG. 被検出者毎の開眼時における上瞼の曲率を示す説明図である。It is explanatory drawing which shows the curvature of the upper eyelid at the time of eye opening for every to-be-detected person. 開眼時における上瞼の曲率と閉眼時における上瞼の最大曲率との相関関係を示す説明図である。It is explanatory drawing which shows correlation with the curvature of the upper eyelid at the time of eye opening, and the maximum curvature of the upper eyelid at the time of eyes closed. 閾値及び開閉眼の分布状況を示す説明図である。It is explanatory drawing which shows the distribution condition of a threshold value and an opening-and-closing eye. 閾値の説明図である。It is explanatory drawing of a threshold value.

符号の説明Explanation of symbols

1…開閉眼判定装置
CL1…眼画像取得手段
CL11…顔画像取得手段
CL12…眼検出手段
CL2…上瞼検出手段
CL3…上瞼座標抽出手段
CL4…曲線近似手段
CL5…相関値検出手段
CL6…開閉眼判定閾値設定手段
CL61…第1算出手段
CL611…第1サンプリング手段
CL612…第1代表値算出手段
CL62…第2算出手段
CL621…第2サンプリング手段
CL622…第2代表値算出手段
CL7…上瞼曲率検出手段
CL8…開閉眼判定手段

DESCRIPTION OF SYMBOLS 1 ... Opening / closing eye determination apparatus CL1 ... Eye image acquisition means CL11 ... Face image acquisition means CL12 ... Eye detection means CL2 ... Upper eyelid detection means CL3 ... Upper eyelid coordinate extraction means CL4 ... Curve approximation means CL5 ... Correlation value detection means CL6 ... Opening / closing Eye determination threshold value setting means CL61 ... first calculation means CL611 ... first sampling means CL612 ... first representative value calculation means CL62 ... second calculation means CL621 ... second sampling means CL622 ... second representative value calculation means CL7 ... upper curvature Detection means CL8 ... Opening / closing eye determination means

Claims (7)

被検出者の眼を含む眼画像を取得する眼画像取得手段と、
前記眼画像取得手段により取得された眼画像から、上瞼を検出する上瞼検出手段と、
前記上瞼検出手段によって検出された上瞼から、上瞼を構成する座標群を抽出する上瞼座標抽出手段と、
前記上瞼座標抽出手段により抽出された上瞼の座標群から上瞼を二次以上の曲線に近似する曲線近似手段と、
前記上瞼座標抽出手段により抽出された上瞼の座標群と前記曲線近似手段によって近似された二次以上の曲線との相関値を検出する相関値検出手段と、
前記相関値検出手段により検出された相関値が基準値よりも高い場合、前記相関値検出手段により検出された相関値が基準値以下の場合よりも、開閉眼判定の基準となる開閉眼判定閾値を大きく設定する開閉眼判定閾値設定手段と、
前記上瞼座標抽出手段により抽出された座標群から、上瞼の曲率を検出する上瞼曲率検出手段と、
前記上瞼曲率検出手段により検出された上瞼の曲率が、前記開閉眼判定閾値設定手段により設定された開閉眼判定閾値以上の場合に開眼と判定し、開閉眼判定閾値に満たない場合に閉眼と判定する開閉眼判定手段と、
を備えることを特徴とする開閉眼判定装置。
Eye image acquisition means for acquiring an eye image including the eyes of the detected person;
Upper eyelid detection means for detecting upper eyelid from the eye image acquired by the eye image acquisition means;
Upper eyelid coordinate extracting means for extracting a coordinate group constituting the upper eyelid from the upper eyelid detected by the upper eyelid detecting means;
A curve approximation means for approximating the upper eyelid to a quadratic or higher curve from the upper eyelid coordinate group extracted by the upper eyelid coordinate extracting means;
Correlation value detection means for detecting a correlation value between the upper eyelid coordinate group extracted by the upper eyelid coordinate extraction means and a quadratic or higher curve approximated by the curve approximation means;
When the correlation value detected by the correlation value detection means is higher than a reference value, the opening / closing eye determination threshold value that serves as a reference for opening / closing eye determination than when the correlation value detected by the correlation value detection means is less than or equal to the reference value Open / close eye determination threshold setting means for setting a large value;
An upper curvature detection means for detecting the curvature of the upper eyelid from the coordinate group extracted by the upper eyelid coordinate extraction means;
When the curvature of the upper eyelid detected by the upper curvature detection means is equal to or greater than the opening / closing eye determination threshold set by the opening / closing eye determination threshold setting means, the eye is determined to be open, and when the opening / closing eye determination threshold is not reached, the eye is closed Opening / closing eye determination means for determining
An open / closed eye determination device comprising:
前記開閉眼判定閾値設定手段は、
開眼時の上瞼の曲率の代表値から設定される第1判定閾値を算出する第1算出手段と、
閉眼時の上瞼の曲率の代表値から設定される第2判定閾値を算出する第2算出手段と、を有し、
前記相関値検出手段から得られた相関値が所定の基準値よりも高い場合に、前記第1算出手段により算出された第1判定閾値を開閉眼判定閾値として設定し、
前記相関値検出手段から得られた相関値が所定の基準値以下の場合に、前記第2算出手段により算出された第2判定閾値を開閉眼判定閾値として設定する
ことを特徴とする請求項1に記載の開閉眼判定装置。
The opening / closing eye determination threshold value setting means includes:
First calculation means for calculating a first determination threshold value set from a representative value of curvature of the upper eyelid at the time of eye opening;
Second calculating means for calculating a second determination threshold value set from a representative value of the curvature of the upper eyelid when the eye is closed,
When the correlation value obtained from the correlation value detection means is higher than a predetermined reference value, the first determination threshold value calculated by the first calculation means is set as the open / close eye determination threshold value,
The second determination threshold value calculated by the second calculation unit is set as an open / closed eye determination threshold value when the correlation value obtained from the correlation value detection unit is a predetermined reference value or less. The open / close eye determination device according to claim 1.
前記第1算出手段は、
上瞼の曲率を所定数サンプリングする第1サンプリング手段と、
前記第1サンプリング手段によってサンプリングされた所定数の曲率から、平均値、中央値又は最頻値のいずれか1つを算出し、算出した値を第1の統計的代表値とする第1代表値算出手段と、を有し、
前記第1代表値算出手段によって求められた第1の統計的代表値を開眼時における曲率と認定し、
この認定した開眼時における上瞼の曲率、及び、予め求めておいた開眼時における上瞼の曲率と閉眼時における上瞼の最大曲率との相関関係から、閉眼時における被検出者個人の上瞼の最大曲率を求め、この最大曲率を前記第1判定閾値として算出する
ことを特徴とする請求項2に記載の開閉眼判定装置。
The first calculation means includes
First sampling means for sampling a predetermined number of curvatures of the upper eyelid,
From the predetermined number of curvatures sampled by the first sampling means, one of an average value, a median value, and a mode value is calculated, and the calculated value is a first representative representative value. Calculating means,
The first statistical representative value obtained by the first representative value calculating means is recognized as the curvature at the time of eye opening,
The upper eyelid curvature when the eye is closed is determined based on the correlation between the curvature of the upper eyelid when the eye is opened and the maximum curvature of the upper eyelid when the eye is closed and the curvature of the upper eyelid when the eye is closed. The open / closed eye determination device according to claim 2, wherein the maximum curvature is calculated, and the maximum curvature is calculated as the first determination threshold value.
前記第2算出手段は、
上瞼の曲率を所定数サンプリングする第2サンプリング手段と、
前記第2サンプリング手段によってサンプリングされた所定数の曲率から、平均値、中央値又は最頻値のいずれか1つを求める第2代表値算出手段と、を有し、
前記第2サンプリング手段は、上瞼の曲率について所定数のサンプリングをN回(Nは2以上の整数)繰り返し、
前記第2代表値算出手段は、
前記第2サンプリング手段によって1回目にサンプリングされた所定数の曲率から、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求め、
前記第2サンプリング手段によってn回目(nは2以上N以下の整数)にサンプリングされた所定数の曲率のうち、第nの統計的代表値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第n+1の統計的代表値として求め、
前記第2代表値算出手段により求めた第N+1の統計的代表値を前記第2判定閾値とする
ことを特徴とする請求項2又は請求項3のいずれかに記載の開閉眼判定装置。
The second calculation means includes
A second sampling means for sampling a predetermined number of curvatures of the upper eyelid;
Second representative value calculating means for obtaining one of an average value, a median value, and a mode value from a predetermined number of curvatures sampled by the second sampling means;
The second sampling means repeats a predetermined number of samplings for the curvature of the upper eyelid N times (N is an integer of 2 or more),
The second representative value calculating means includes:
From the predetermined number of curvatures sampled for the first time by the second sampling means, one of the average value, median value or mode value of the curvature is obtained as the second statistical representative value,
Of the predetermined number of curvatures sampled n times (n is an integer not less than 2 and not more than N) by the second sampling means, for the curvature smaller than the nth statistical representative value, the average value of the curvature, the median value, or Find one of the mode values as the (n + 1) th statistical representative value,
The open / closed eye determination device according to claim 2, wherein the (N + 1) th statistical representative value obtained by the second representative value calculation unit is set as the second determination threshold value.
前記第2算出手段は、
上瞼の曲率を所定数サンプリングする第2サンプリング手段と、
前記第2サンプリング手段によってサンプリングされた所定数の曲率のうち、前記第1算出手段により算出された第1判定閾値よりも小さい曲率について、曲率の平均値、中央値又は最頻値のいずれか1つを第2の統計的代表値として求める第2の代表値算出手段と、を有し、
前記第2代表値算出手段により求めた第2の統計的代表値を前記第2判定閾値とする
ことを特徴とする請求項3に記載の開閉眼判定装置。
The second calculation means includes
A second sampling means for sampling a predetermined number of curvatures of the upper eyelid;
Of the predetermined number of curvatures sampled by the second sampling means, any one of an average value, median value, or mode value of the curvature is smaller than the first determination threshold value calculated by the first calculation means. Second representative value calculating means for obtaining one as a second statistical representative value,
The open / closed eye determination device according to claim 3, wherein a second statistical representative value obtained by the second representative value calculation unit is used as the second determination threshold value.
前記眼画像取得手段は、
被検出者の前方略正面に設置され、被検出者の顔全体を撮像する顔画像撮像手段と、
前記顔画像撮像手段によって撮像された顔全体を含む顔画像から被検出者の眼を検出する眼検出手段と、を有し、
前記眼検出手段によって検出された眼を含み顔画像よりも小さくされた微小画像を、顔画像から抽出して眼画像とする
ことを特徴とする請求項1〜請求項5のいずれか1項に記載の開閉眼判定装置。
The eye image acquisition means includes
A face image capturing means that is installed substantially in front of the detected person and images the entire face of the detected person;
Eye detection means for detecting the eyes of the person to be detected from a face image including the entire face imaged by the face image imaging means,
6. The minute image that is smaller than the face image including the eyes detected by the eye detection means is extracted from the face image and used as an eye image. The open / close eye determination device described.
被検出者の眼を含む眼画像を取得して上瞼を検出し、検出した上瞼から、上瞼を構成する座標群を抽出し、抽出した上瞼の座標群から上瞼を二次以上の曲線に近似し、
抽出した上瞼の座標群と、近似した二次以上の曲線との相関値を検出して、検出した相関値が基準値よりも高い場合、相関値が基準値以下の場合よりも、開閉眼判定閾値を大きく設定し、
抽出した上瞼の座標群から、上瞼の曲率を検出して、検出した上瞼の曲率が、前記開閉眼判定閾値以上の場合に開眼と判定し、前記開閉眼判定閾値に満たない場合に閉眼と判定する
ことを特徴とする開閉眼判定装置。

Acquire eye images including the eyes of the person to be detected, detect upper eyelids, extract the coordinate group that constitutes upper eyelid from the detected upper eyelid, and extract the upper eyelid from the extracted upper eyelid coordinate group to secondary or higher To the curve
When the correlation value between the extracted upper eyelid coordinate group and the approximated quadratic or higher curve is detected, and the detected correlation value is higher than the reference value, the opening / closing eye is lower than when the correlation value is lower than the reference value. Set a large judgment threshold,
When the curvature of the upper eyelid is detected from the extracted upper eyelid coordinate group and the detected curvature of the upper eyelid is equal to or greater than the opening / closing eye determination threshold, the eye opening is determined, and when the opening / closing eye determination threshold is not reached An open / closed eye determination device characterized by determining that the eye is closed.

JP2004308715A 2004-10-22 2004-10-22 Open / close eye determination device Expired - Fee Related JP4529635B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004308715A JP4529635B2 (en) 2004-10-22 2004-10-22 Open / close eye determination device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004308715A JP4529635B2 (en) 2004-10-22 2004-10-22 Open / close eye determination device

Publications (2)

Publication Number Publication Date
JP2006120006A JP2006120006A (en) 2006-05-11
JP4529635B2 true JP4529635B2 (en) 2010-08-25

Family

ID=36537815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004308715A Expired - Fee Related JP4529635B2 (en) 2004-10-22 2004-10-22 Open / close eye determination device

Country Status (1)

Country Link
JP (1) JP4529635B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101745329B1 (en) * 2015-12-24 2017-06-09 (재)경북차량용임베디드기술연구원 Alcohol interlock system based iris recognition

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4331197B2 (en) * 2006-11-06 2009-09-16 トヨタ自動車株式会社 Eye opening detection device and method
JP4776581B2 (en) * 2007-04-06 2011-09-21 富士通株式会社 Sleep state detection method, sleep state detection device, sleep state detection system, and computer program
JP2010210577A (en) * 2009-03-12 2010-09-24 Daihatsu Motor Co Ltd Shape recognition device
JP5395470B2 (en) * 2009-03-12 2014-01-22 ダイハツ工業株式会社 Shape recognition device
JP5435013B2 (en) * 2011-11-17 2014-03-05 沖電気工業株式会社 Eye open / close determination device and program
CN103440655A (en) * 2013-08-27 2013-12-11 西北工业大学 Crossing bridge and offshore ship joint detection method in onboard remote sensing image
CN108135469B (en) * 2015-08-21 2021-03-09 奇跃公司 Eyelid shape estimation using eye pose measurements
CN108135467A (en) 2015-08-21 2018-06-08 奇跃公司 Eyelid shape is estimated
JP5925947B1 (en) * 2015-10-10 2016-05-25 合同会社Pit Eyelash extension evaluation device, eyelash extension evaluation method, eyelash extension evaluation system, and program
WO2017066296A1 (en) 2015-10-16 2017-04-20 Magic Leap, Inc. Eye pose identification using eye features
CN113221599B (en) * 2020-01-21 2022-06-10 魔门塔(苏州)科技有限公司 Eyelid curve construction method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004220080A (en) * 2003-01-09 2004-08-05 Nissan Motor Co Ltd Eye opening/closing determining device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004220080A (en) * 2003-01-09 2004-08-05 Nissan Motor Co Ltd Eye opening/closing determining device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101745329B1 (en) * 2015-12-24 2017-06-09 (재)경북차량용임베디드기술연구원 Alcohol interlock system based iris recognition

Also Published As

Publication number Publication date
JP2006120006A (en) 2006-05-11

Similar Documents

Publication Publication Date Title
JP4529635B2 (en) Open / close eye determination device
EP2074550B1 (en) Eye opening detection system and method of detecting eye opening
JP4506250B2 (en) Upper eyelid detection device
US6118887A (en) Robust multi-modal method for recognizing objects
JP6234762B2 (en) Eye detection device, method, and program
JP5262243B2 (en) Eye opening / closing discrimination device and program
CN101027678A (en) Single image based multi-biometric system and method
JP2001022933A (en) Face image processor using two-dimensional template
JP4826306B2 (en) Facial part tracking method and apparatus
JP2000123188A (en) Eye open/close discriminating device
KR101523765B1 (en) Enhanced Method for Detecting Iris from Smartphone Images in Real-Time
JP4107087B2 (en) Open / close eye determination device
JP2001307076A (en) Eye state detector and nap detector
JP2009205283A (en) Image processing apparatus, method and program
US20040021305A1 (en) Safety apparatus against automobile clash
JP4107104B2 (en) Facial part tracking device
JP4725096B2 (en) Arousal level judgment device
KR101886416B1 (en) System for controlling door of vehicle and method thereof
He et al. A novel iris segmentation method for hand-held capture device
JP2002006034A (en) Method and apparatus for class discrimination of target in radar
JP2005013626A (en) Awakefullness detector
JP2007026103A (en) Apparatus and method for determining face part
JP4710679B2 (en) Opening and closing eye determination method and apparatus
JP3801075B2 (en) Image enlargement device
JP2004341953A (en) Face portion tracking device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070925

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100513

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100518

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100531

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130618

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees