This application is based on and claims priority under 35 U.S.C. §119 to Japanese Patent Application 2007-066780, filed on Mar. 15, 2007, the entire content of which is incorporated herein by reference.
This invention generally relates to an eyelid detection apparatus, an eyelid detection method and a program therefor.
A technique for detecting a position of a face or an eye of a human from an image including the face of the human is known. For example, JP2000-137792A describes a technique for continuously and correctly detecting an eye by extracting an edge line corresponding to an upper eyelid and an edge line corresponding to a lower eyelid from a face image, by generating a template thereof and matching the template to a candidate of the eye.
However, in the technique of JP2000-137792A, correlative operation is performed for matching the template. Accordingly, a processing time tends to be long. Therefore, the operation of the technique of JP2000-133792A is difficult for an in-vehicle CPU, of which a processing speed is low. Further, using a dedicated computing unit tends to cause high cost.
A need thus exists for an eyelid detection apparatus, an eyelid detection method and a program therefor which is not susceptible to the drawback mentioned above.
According to an aspect of the present invention, an eyelid detection apparatus includes a face-image storing means for storing an image of a face of a subject, an eyelid-candidate extracting means for processing the image stored in the face-image storing means to extract a pair of lines, which becomes a candidate of a combination of a line corresponding to an upper eyelid and a line corresponding to a lower eyelid, a parameter calculating means for calculating a parameter, which indicates a possibility that a part of the image stored in the face-image storing means, the part corresponding to the pair of lines extracted by the eyelid-candidate extracting means, includes at least one of outer and inner corners of an eye, and an eyelid detecting means for detecting a position of an eyelid of the subject on the basis of the parameter calculated by the parameter calculating means.
According to another aspect of the present invention, an eyelid detection method includes processes of processing a face image to extract a pair of lines, which becomes a candidate of a combination of an upper eyelid and a lower eyelid, calculating a parameter which indicates a possibility that the extracted pair of lines which becomes the candidate of the combination of the upper eyelid and the lower eyelid, includes at least one of outer and inner corners of an eye, and detecting a position of an eyelid of a subject on the basis of the calculated parameter.
According to another aspect of the present invention, a program instructs a computer to function as a face-image storing means for storing an image of a face of a subject, an eyelid candidate-extracting means for processing the image stored in the face-image storing means and extracting a pair of lines which becomes a candidate of a combination of a line corresponding to an upper eyelid and a line corresponding to a lower eyelid, a parameter calculating means for calculating a parameter which indicates possibility that a part of the image stored in the face-image storing means, the part corresponding to the pair of lines extracted by the eyelid-candidate extracting means, includes at least one of outer and inner corners of an eye, and an eyelid detecting means for detecting a position of an eyelid of the subject on the basis of the parameter calculated by the parameter calculating means.
The foregoing and additional features and characteristics of the present invention will become more apparent from the following detailed description considered with reference to the accompanying drawings, wherein:
(First embodiment) A eyelid detection apparatus 50 according to a first embodiment of the present invention will be explained wit reference to drawing figures.
As illustrated in
The camera 10 is composed of a CCD camera, or the like. The camera 10 takes a gray-scale image of the face of the driver at a predetermined cycle (for example, 1/30 seconds) and outputs the gray-scale image of the face of the driver. The face image sequentially output from the camera 10 includes, not only the image of the face of the driver, but also a background image.
The display unit 16 is composed oft for example, a liquid crystal display (LCD) or a cathode ray tube (CRT), or the like. The display unit 16 displays a binarized image generated from the face image taken by the camera 10, or the like.
The computer 14 processes a motion image of the face taken by the camera 10 to detect a position of the eyelid. As illustrated in
The A/D (analog-digital) converter 21 converts an analog image signal taken by the camera 10 into a digital signal.
The image memory 22 (face-image storing means) is generated by tie camera 10 and stores an image data digitized by the A/D converter 21.
The ROM 23 stores a program for controlling a CPU operation. Further, the ROM 23 stores various kinds of fixed data for executing an image process described below.
The CPU 24 controls the compute 14. Further, the CPU 24 executes the programs stored in the ROM 23 to process a series of the face images taken by the camera 10 and to detect the eyelid. The CPU 24 serves as an eyelid-candidate extracting means for performing an eyelid-candidate extracting process (S300), a parameter calculating means for performing a parameter calculating process (S440), an eyelid detecting means for performing an eyelid detecting process (S470). Further, the CPU 24 serves as a difference calculating means for performing a difference calculating process (S550).
The RAM 25 functions as a work area of the CPU 24.
The display control unit 26 converts the image data, or the like, into a data format, which can be output by the display unit 16, under the control of the CPU 24 and outputs the converted data to the display unit 16.
The lighting source control unit 27 controls turning on and off of the lighting source 12.
The setting memory 28 preliminarily stores parameters illustrated in
The operation unit 29 receives an operation request from a user and sends an operation signal corresponding to the requested operation to the CPU 24.
Next, an example of the fixed data stored in the ROM 23 will be described with reference to
Further, the ROM 23 stores a horizontal-edge detecting operator (horizontal-edge detecting Sobel filter). The horizontal-edge detecting Sobel filter is an operator for emphasizing a gray level difference in a vertical direction as illustrated in
The ROM 23 stores a left end pattern of an outer or inner corner of an eye as illustrated in
The ROM 23 stores a right end pattern of the outer or inner corner of the eye as illustrated in
An example of parameters stored in the setting memory 28 will be explained with reference to
An operation of the eyelid detection apparatus 50 according to the first embodiment will be described. In the first embodiment, the eyelid detection apparatus 50 is configured as described above.
Firstly; an operation of the eyelid detection apparatus 50 for detecting the eyelid in the face image will be outlined with reference to
The camera 10 takes a face image of a subject, as illustrated in
Next the CPU 24 sequentially loads the face image stored in the image memory 22 and executes following processes.
Firstly, the CPU 24 processes the loaded face image with use of the vertical-edge detecting Sobel filter (
For example, in a case of the face image illustrated in
The CPU 24 detects the eyelid region, in which the eyelid is assumed to be included, as illustrated in
The CPU 24 performs a process for extracting the horizontal edge line in the image of the eyelid region with use of the horizontal-edge detecting Sobel filter (
As a result, as illustrated in
Next, the CPU 24 extracts a combination (edge line pair) of the minus edge and the plus edge, which satisfy following three formulas, from the obtained minus edges and the plus edges, as a candidate of upper and lower eyelids.
Lp−Lm<Lth (1)
Here, Lp is a value indicating a length of the plus edge, Lm is a value indicating a length of the minus edge, and Lth indicates the threshold. The threshold Lth is stored in the setting memory 28 as illustrated in
Cxp−Cxm<Cxth (2)
Here, Cxp indicates an x-coordinate of a centroid of the plus edge, Cxm indicates an x-coordinate of a centroid of the minus edge, and Cxth indicates the threshold. The threshold Cxth is stored in the setting memory 28 as illustrated in
Dg<Dth (3)
Here, Dg indicates a distance between the centroids of the plus edge and the minus edge and Dth indicates tie threshold. The threshold Dth is stored in the setting memory 28 as illustrated in
In the combination of the minus edge and the plus edge, which is extracted by the CPU 24 with use of the three formulas described above, the minus edge is considered as an upper eyelid candidate and the plus edge is considered as a lower eyelid candidate.
In other words, when the combination of the minus edge and the plus edge satisfies the formulas (1) to (3), the lengths of the minus edge and the plus edge are equal to each other to some extent, the positions of the minus edge and the plus edge are close to each other to some extent and the x-coordinates of the centroids of the minus edge and the plus edge correspond to to some extent.
Next, the CPU 24 sets a region of the outer or inner corner of the eye at right and left ends of each eyelid candidate (edge line pair). The region of the outer or inner corner of the eye is a region, in which a possibility of existence of the outer or inner corner of the eye is high. In the embodiment, the region of the outer or inner corner of the eye is a region of 5 pixels (horizontal)×5 pixels (vertical) set at each of right and left ends of the lower eyelid candidate (plus edge) of the eyelid candidate (edge line pair) as a center. For example, as illustrated in
The CPU 24 calculates a left end evaluation value of the outer or inner corner of the eye with use of the left end pattern of the outer or inner corner of the eye (
Specifically, as illustrated in
The CPU 24 calculates a summation of the left end evaluation value of the outer or inner corner of the eye and the right end evaluation value of the outer or inner corner of the eye of each eyelid candidate. The CPU 24 determines a largest summation of the right end and left end evaluation values of the outer or inner corner of the eye as right or left eyelid. The CPU 24 can determine the largest summation of the right end and left end evaluation values of the outer or inner corner of the eye and a second largest summation of the right end and left end evaluation values of the outer or inner corner of the eye as right and left eyelids.
Details of the operation of the eyelid detection apparatus 50 for detecting the eyelid in the face image will be explained with reference to from
An eyelid detection process performed by the eyelid detection apparatus 50 according to the first embodiment of the present invention will be explained with reference to a flowchart illustrated in
The CPU 24 in the computer 14 periodically (for example, every 1/30 seconds) starts the eyelid detection process illustrated in
Firstly, power of the eyelid detection apparatus 50 is turned on. Then, the CPU 24 performs a preprocess described below. The CPU 24 takes the face image of the driver, extracts a vertical edge line, and extracts the horizontal edge line (step S100).
Next, the CPU 24 performs a face-position detecting process described below. The CPU 24 detects the right and left ends of the face with use of the vertical edge line extracted in the preprocess described above, detects the upper and lower ends of the face with use of the horizontal edge line extracted in the preprocess described above, and detects the face position in the face image (step S200).
The CPU 24 performs an eyelid-candidate extracting process described below. The CPU 24 extracts the eyelid region from the face image with use of the face position detected in the face-position detecting process described above, extracts the horizontal edge lines, extracts a pair of edge lines (edge line pair), which becomes the candidate of the upper and lower eyelids, from the extracted horizontal edge lines (step S300).
The CPU 24 performs an eyelid distinguishing process described below. The CPU 24 sets the region of the outer or inner corner of the eye at the right and left ends of each eyelid candidate, calculates evaluation values of the outer or inner corner of the eye of the set regions and determines the right or left eyelid on the basis of the calculated evaluation values of the outer or inner corner of the eye (step S400). Here, it is possible for the CPU 24 to determine the right and left eyelids on the basis of the calculated evaluation values. Then, the CPU 24 ends the processes.
Thus, according to the eyelid detection process, taking the face image and detecting the eyelid from the image can be periodically repeated.
Next, the preprocess performed in the step S100 of the eyelid detection process will be explained. Briefly, in the preprocess, the eyelid detection apparatus 50 takes the face image of the driver and performs an edge detection with use of a Sobel filter.
The preprocess (S100) will be detailed with reference to
Firstly, the CPU 24 performs a capture process (step S110). The CPU 24 loads the face image of the subject taken by the camera 10 through the A/D converter 21 and stores the face image in the image memory 22.
Next, the CPU 24 performs a coordinate transformation process. The CPU 24 thins out the pixels of each face image stored in the image memory 22 to a degree that the Sobel filter process described below can be executed (step S120).
The CPU 24 processes the face image after the coordinate transformation with use of the vertical-edge detecting operator (
Thus, according to the preprocess, the image, in which the vertical edge line in the taken face image is emphasized, and the image, in which the horizontal edge line in the taken face image is emphasized, can be generated.
Here, the face-position detecting process performed in the step S200 of the eyelid detection process will be explained. Briefly, in the face-position detecting process, the eyelid detection apparatus 50 detects the face position in the face image with use of the image, in which the vertical edge line is emphasized, and the image, in which the horizontal edge line is emphasized, generated in the preprocess.
Details of the face-position detecting process (S200) will be explained with reference to
Firstly, the CPU 24 performs a process for detecting the right and left ends of the face described below. The CPU 24 detects a position of the right and left ends of the face in the face image with use of the image, in which the vertical edge line is emphasized, generated in the preprocess (step S210).
Next, the CPU 24 performs a process for detecting the upper and lower ends of the face described below. The CPU 24 detects positions of the upper and lower ends of the face in the face image with use of the image, in which the horizontal edge line is emphasized, generated in the preprocess (step S220). Then, the CPU 24 ends the face-position detecting process.
Thus, according to the face-position detecting process, the face position in the face image can be detected by detecting the right and left ends and the upper and lower ends of the face.
Here, the process for detecting the right and left ends of the face performed in the step S210 of Me face-position detecting process will be explained. Briefly, in the process for detecting the right and left ends of the face, the eyelid detection apparatus 50 detects the position of the right and left ends of the face in the face image with use of the image, in which the vertical edge line is emphasized, generated in the preprocess.
Details of the process for detecting the right and left ends of the face (S210) will be explained with reference to
Firstly, the CPU 24 performs a process for making a histogram for detecting the right and left ends of the face (step S211). The CPU 24 makes a histogram by projecting pixel values after the Sobel filter process with use of the vertical-edge detecting Sobel filter in the vertical direction. Specifically, the pixel values are divided into several steps and the pixels are classified into the steps on the basis of the pixel values. A step, in which the largest number of pixels are included, is determined for every x value. An average of the pixel values included in the step is calculated for every x value. A graph of the average relating to the x-coordinate is made. The graph serves as the histogram described above.
The CPU 24 extracts each point, at which a histogram value takes a peak, (hereinafter referred to as a peak point) from the histogram made in the step S211 (step S212).
The CPU 24 extracts peak points, of which the histogram values are equal to or larger than a threshold, from the peak points extracted in the step S212 as a candidate of the right and left ends of the face (step S213).
The CPU 24 judges whether two peak points, of which the histogram values are equal to or larger than the threshold, are extracted as the candidate of the right and left ends of the face as a result of the process in the step S213 (step S214).
When the CPU 24 determines that the two peak points, of which the histogram values are equal to or larger than the threshold, are extracted (step S214; YES), the CPU 24 proceeds the process to step S216. The CPU 24 determines positions, at which the histogram values take the extracted two peak points, as the right and left ends of tie face (step S216).
When the CPU 24 determines that the two peak points, of which the histogram values are equal to or larger than the threshold, are not extracted (step S214; NO), the CPU 24 extracts a combination of two peak points between which a distance is suitable for a width of a face of a human (step S215).
The CPU 24 determines positions, at which the histogram values take the extracted two peak points, as the right and left ends of the face (step S216).
Thus, according to the process for detecting the right and left ends of the face, the right and left ends of the face can be detected in the face image.
Here, the process for detecting the upper and lower ends of the face performed in the step S220 of the face-position detecting process will be explained. Briefly, in the process for detecting the upper and lower ends of the face, the eyelid detection apparatus 50 detects positions of the upper and lower ends of the face in the face image with use of the image, in which the horizontal edge line is emphasized, generated in the preprocess.
Details of the process for detecting the upper and lower ends of the face (S220) will be explained with reference to
Firstly, the CPU 24 performs a process for making a histogram for detecting the upper and lower ends of the face (step S221). The CPU 24 makes a histogram by projecting pixel values after the Sobel filter process with use of the horizontal-edge detecting Sobel filter in the horizontal direction. Specifically, the pixel values are divided into several steps and the pixels are classified into the steps on the basis of the pixel values. A step, in which the largest number of pixels are included, is determined for every y value. A average of the pixel values included in the step is calculated for every y value. A graph of the average relating to the y-coordinate is made. The graph serves as the histogram described above.
The CPU 24 extracts each point, at which a histogram value takes a peak, (hereinafter referred to as a peak point) from the histogram made in the step S221 (step S222).
The CPU 24 determines conformity of each peak point to the eyelid, an eyebrow, a mouth, or the like, on the basis of the histogram values of the peak points extracted in the step S222 (step S223).
The CPU 24 calculates the positions of the upper and lower ends of the face in the face image on the basis of each peak point corresponding to the eyelid, the eyebrow, the mouth, or the like, in the step S223 (step S224). For example, a position higher than the detected eyebrow by three pixels is considered as an upper end of the face, and a position lower than the detected mouth by three pixels is considered as a lower end of the face (between the mouth and a jaw).
Thus, according to the process for detecting the upper and lower ends of the face, the positions of the upper and lower ends of the face can be calculated in Me face image.
Here, the eyelid-candidate extracting process performed in the step S300 of the eyelid detection process will be explained. Briefly, in the eyelid-candidate extracting process, the eyelid detection apparatus 50 extracts a certain region, in which the eyelid is assumed to be present, on the basis of the position of the face detected in the face-position detecting process. After that, the eyelid detection apparatus 50 detects the plus edge and the minus edge from the extracted region with use of the horizontal-edge detecting Sobel filter and extracts the edge line pair, which satisfies the formulas (1) to (3) described above, as the eyelid candidate.
Details of the eyelid-candidate extracting process (S300) will be explained with reference to
Firstly, the CPU 24 extracts the image of the region, in which the eyelid is assumed to be present, from each face image stored in the image memory 22 on the basis of the positions of the right and left ends of the face and the upper and lower ends of the face detected in the face-position detecting process and the eyelid-region setting parameters (step S310).
The CPU 24 processes the image of the region extracted in the step S310 with use of the horizontal-edge detecting operator (
The CPU 24 calculates, for the horizontal edge line extracted in the step S320, the length Lp of the plus edge, the length Lm of the minus edge, the x-coordinate Cxp of the centroid of the plus edge, the x-coordinate Cxm of the centroid of the minus edge, the distance Dg between the centroid of the minus edge and the centroid of the plus edge (step S330).
The CPU 24 extracts the combination of the minus edge and the plus edge, which satisfies the formulas (1) to (3), as the eyelid candidate with use of the parameters calculated in the step S330 (step S340).
Thus, according to the eyelid-candidate extracting process, the combination of the minus edge and the plus edge, which becomes the eyelid candidate, can be extracted in the region, in which the eyelid is assumed to be present.
Here, the eyelid distinguishing process performed in the step S400 of tie eyelid detection process will be explained. Briefly, the eyelid detection apparatus 50 sets regions of the outer or inner corner of the eye at die right and left ends of each eyelid candidate extracted in the eyelid-candidate extracting process, calculates the evaluation values of the outer or inner corner of the eye of the set regions, and distinguishes the eyelid candidate, of which the summation of the calculated left end and right end evaluation values of the outer or inner corner of the eye is largest, as the right or left eyelid. It is possible for the eyelid detection apparatus 50 to distinguish the eyelid candidates, of which the summations of the calculated left end and right end evaluation values of the outer or inner corner of the eye are largest and second largest, as the right and left eyelid.
Details of the eyelid distinguishing process (S400) will be explained with reference to
Firstly, the CPU 24 selects an arbitrary eyelid candidate, of which the evaluation value of the outer or inner corner of the eye is not calculated, from the eyelid candidates extracted in the eyelid-candidate extracting process (step S410).
Next, the CPU 24 selects an end, of which the evaluation value of the outer or inner corner of the eye is not calculated, from the right and left ends of the plus edge of the selected eyelid candidate (step S420).
The CPU 24 sets the region of the outer or inner corner of the eye at the selected end of the plus edge of the selected eyelid candidate as a center (step S430).
The CPU 24 locates the pattern of the outer or inner corner of the eye corresponding to the selected end on the original image before the Sobel filter process is performed at a region corresponding to the region of the outer or inner corner of the eye. Next, the CPU 24 calculates the average of the intensity of the pixels in the original image at the part corresponding to the skin part of the pattern and the average of the intensity of the pixels in the original image at the part corresponding to the eye part of the pattern. The CPU 24 calculates the evaluation value of the outer or inner corner of the eye by subtracting the calculated average of the intensity of the pixels in the original image at the part corresponding to the eye part from the calculated average of the intensity of the pixels in the original image at the part corresponding to the skin part (step S440, parameter calculating process).
The CPU 24 judges whether the right end and left end evaluation values of the outer or inner corner of the eye are calculated for the selected eyelid candidate or not (step S450).
When the CPU 24 determines that the right end and left end evaluation values of the outer or inner corner of the eye are not calculated for the selected eyelid candidate (step S450; NO), the CPU 24 goes back to the step S420.
When the CPU 24 determines that the right end and left end evaluation values of the outer or inner corner of the eye are calculated for the selected eyelid candidate (step S450; YES), the CPU 24 judges whether the evaluation values of the outer or inner corner of the eye are calculated for all of the eyelid candidates or not (step S460).
When the CPU 24 determines that the evaluation values of the outer or inner corner of the eye are calculated for all of the eyelid candidates (step S460; NO), the CPU 24 goes back to the step S410.
When the CPU 24 determines that the evaluation values of the outer or inner corner of the eye are calculated for all of the eyelid candidates (step 5460; YES), the CPU 24 calculates a summation of the right end and left end evaluation values of the outer or inner corner of the eye of each eyelid candidate. The CPU 24 determines an eyelid candidate, of which the calculated summation of the right end and left end evaluation values of the outer or inner corner of the eye is largest, as the right or left eyelid (S470, eyelid detecting process). The CPU 24 can determine eyelid candidates, of which the calculated summations of the right end and left end evaluation values of the outer or inner corner of the eye are largest and second largest, as the right and left eyelids.
Thus, according to the eyelid distinguishing process, the evaluation values, which evaluate how the right and left ends of each eyelid candidate resemble the outer or inner corner of the eye, can be calculated and the right and left eyelids can be distinguished on the basis of the evaluation values.
As described above, the eyelid detection apparatus 50 according to the first embodiment detects the face position in plural face images taken at different timings. Then, the eyelid detection apparatus 50 extracts the region, in which the eyelid is assumed to be present, on the basis of the face position and extracts the edge line pair, which becomes the eyelid candidate, from the region. The eyelid detection apparatus 50 determines, in the extracted eyelid candidates (edge line pair), the eyelid candidate, in which the possibility that the outer and inner corners of the eye are included is high, as the eyelid. Accordingly, the eyelid detection apparatus 50 can detect the eyelid correctly within a short time.
(Second embodiment) In the first embodiments when the eyelid detection apparatus 50 distinguishes the eyelid from the eyelid candidates, the eyelid detection apparatus 50 sets the region of the outer or inner corner of the eye, of which an area is as same as that of the pattern of the outer or inner corner of the eye, for each eyelid candidate, applies the pattern of the outer or inner corner of the eye to the region of the outer or inner corner of the eye, and calculates the evaluation value of the outer or inner corner of the eye. However, in the second embodiment, firstly, when the eyelid is distinguished from the eyelid candidates, the eyelid detection apparatus 50 can set a region of the outer or inner corner of the eye, of which an area is larger than that of the pattern of the outer or inner corner of the eye as illustrated in
In the meantime, the configuration of the eyelid detection apparatus according to the second embodiment is similar to the configuration of the eyelid detection apparatus according to the first embodiment. Further, processes other than the eyelid distinguishing process according to the second embodiment are similar to those of the first embodiment.
Details of the eyelid distinguishing process (S400) according to the second embodiment will be explained with reference to
Firstly, the CPU 24 selects an arbitrary eyelid candidate, of which the evaluation value of the outer or inner corner of the eye is not calculated, from the eyelid candidates extracted in the eyelid-candidate extracting process (step S510).
Next, the CPU 24 selects an end, of which the evaluation value of the outer or inner corner of the eye is not calculated, from the right and left ends of the plus edge of the selected eyelid candidate (step S520).
The CPU 24 sets the region of the outer or inner corner of the eye at the selected end of the plus edge of the selected eyelid candidate as a center (step S530).
The CPU 24 selects an arbitrary point (x, y) in the set region of the outer or inner corner of the eye (step S540).
The CPU 24 locates the pattern of the outer or inner corner of the eye of the selected end on the original image before the Sobel filter process at the arbitrary point (x, y) of the region of the outer or inner corner of the eye as a base point. Next, the CPU 24 calculates the average of the intensity of the pixels in the original image at the part corresponding to the skin part of the pattern and the average of the intensity of the pixels in the original image at the part corresponding to the eye part of the pattern. The CPU 24 calculates the temporal evaluation value σ (x, y) (difference) of the outer or inner corner of the eye by subtracting the calculated average of the intensity of the pixels in the original image at the part corresponding to the eye part from the calculated average of the intensity of the pixels in the original image at the part corresponding to the skin part (step S550 difference calculating process).
The CPU 24 judges whether the temporal evaluation values plural differences) of the outer or inner corner of the eye are calculated for all of the region of the outer or inner corner of the eye or not (step S560).
When the CPU 24 determines that the temporal evaluation values of the outer or inner corer of the eye are not calculated for all of the region of the outer or inner corner of the eye (step S560; NO), the CPU 24 goes back to the step S540.
When the CPU 24 determines that the temporal evaluation values of the outer or inner corner of the eye are calculated for all of the region of the outer or inner corner of the eye (step S560; YES), the CPU 24 determines the maximum calculated temporal evaluation value (maximum difference) of the outer or inner corner of the eye as the evaluation value of the outer or inner corner of be eye of the selected end of the selected eyelid candidate (step S570, parameter calculating process).
The CPU 24 judges whether the right end and left end evaluation values of the outer or inner corner of the eye are calculated for the selected eyelid candidate or not (step S580).
When the CPU 24 determines that the right end and left end evaluation values of the outer or inner corner of the eye are not calculated for the selected eyelid candidate (step S580; NO), the CPU 24 goes back to the step S520.
When the CPU 24 determines that the right end and left end evaluation values of the outer or inner corner of the eye are calculated for the selected eyelid candidate (step S580; YES), the CPU 24 judges whether the evaluation values of the outer or inner corner of the eye are calculated for all of the eyelid candidates or not (step S590),
When the CPU 24 determines that the evaluation values of the outer or inner corner of the eye are not calculated for all of the eyelid candidates (step 5590; NO), the CPU 24 goes back to the step S510.
When the CPU 24 determines that the evaluation values of the outer or inner corner of the eye are calculated for all of the eyelid candidates (step S590; YES), the CPU 24 calculates the summation of the right end and left end evaluation values of the outer or inner corner of the eye of each eyelid candidate. The CPU 24 determines an eyelid candidate, of which the calculated summation of the right end and left end evaluation values of the outer or inner corner of the eye is largest as the right or left eyelid (step S600, eyelid detecting process). The CPU 24 can determine eyelid candidates, of which the calculated summation of the right end and left end evaluation values of the outer or inner corner of the eye are largest and second largest, as the right and left eyelids.
Thus, according to the eyelid distinguishing process of the second embodiment, parts, which resemble the outer and inner corners of the eye, can be extracted from the region neat the right and left ends of each eyelid candidate, the evaluation values of the extracted parts can be calculated, and the right and left eyelids can be distinguished on the basis of the evaluation values.
As described above, the eyelid detection apparatus 50 according to the second embodiment detects the face position from the plural face images taken at different timings. Then, the eyelid detection apparatus 50 extracts the region, in which the eyelid is assumed to be present, on the basis of the face position and extracts the edge line pair, which becomes the eyelid candidate, from the region. The eyelid detection apparatus 50 sets the region of the outer or inner corner of the eye, of which the area is larger than that of tie pattern of the outer or inner corner of the eye, for the right and left ends of each extracted eyelid candidate (edge line pair). Next, the eyelid detection apparatus 50 scans all of the region of the outer or inner corner of the eye by the pattern of the outer or inner corner of the eyes calculates the temporal evaluation values of the outer or inner corner of the eye for the regions scanned by the pattern of the outer or inner corner of the eye, determines the maximum temporal evaluation value of the outer or inner corner of the eye as the evaluation value of the outer or inner corer of the eye, and distinguishes the right or left eyelid on the basis of the evaluation values of the outer or inner corner of the eye. Accordingly, the eyelid detection apparatus 50 can extract parts, which resemble the outer and inner corners of the eye mostly, from the eyelid candidates. Therefore, the eyelid detection apparatus 50 can detect the eyelid correctly within a short time.
In the meantime, configurations of the eyelid detection apparatus are not limited to the embodiments described above. Various kinds of modifications and applications can be made for the eyelid detection apparatus.
In the first and second embodiments, the computer 14 performs the eyelid detection process for the motion image of the face of the subject taken by the camera 10. However, in an application example, a motion image of the face of the subject taken by an external device other than the camera 10 can be stored in the image memory 22 and the eyelid detection process can be performed for the motion image. Further, the eyelid detection process can be performed for plural face images.
Further, in the first and second embodiments, in the face-position detecting process (S200), the Sobel filter process is executed for the face image and the face position is detected from the histogram on the basis of the pixel value. However, in an application example, as described in JP2004-310396A, the face position can be detected by temporally differentiating each pixel included by the taken image, projecting the temporally differentiated image in a vertical direction to make a histogram, summing the histograms of an edge-extracted image and the temporally differentiated image, and determining high peak values of the summed histogram as both ends of the face.
Further, in the face-position detecting process (S200), a template matching method can be utilized. The face position can be detected by matching a preliminarily registered template to the face image.
Further, in the embodiment, a part, in which the possibility that the part includes the outer and inner corners of the eye is high, is distinguished as the eyelid. However, a part, in which a possibility that the part includes either one of the outer and inner corners of the eye is high, can be distinguished as the eyelid.
Further, in the embodiment, a method for extracting the horizontal edge lines with use of the Sobel filter is utilized for detecting lines corresponding to the upper and lower eyelids in the face image. However, other method can be utilized for detecting an edge. For example, an edge can be detected with use of a MAX-MIN filter.
Further, in the embodiment, the regions of the outer or inner corner of the eye are set at right and left ends of the lower eyelid candidate (plus edge) as centers. However, the regions of the outer or inner corner of the eye can be set at points other than the right and left ends of the plus edge as centers. For example, the region of the outer or inner corner of the eye can be set at a part, at which a proximity of the end of the plus edge accounts for approximately two thirds of the region and a blank accounts for one third of the region.
In the meantime, the eyelid detection apparatus can be carried out not only by a dedicated system but also by a general computer system. For example, the program for executing the operations described above can be stored in a recording medium (flexible disk, CD-ROM, DVD-ROM, or the like), which can be read by a computer system, and can be distributed. The eyelid detection apparatus can be configured from a computer system, which is configured so that the face image can be input, and in which the program is installed. Further, the program can be stored in a storage of a server apparatus on a communication network, such as an internet, or the like. The eyelid detection apparatus can be configured from a general computer system, in which the program is downloaded, or the like.
Further, in a case where functions described above are shared by an operating system (OS) and an application, or in a case where the functions are carried out with cooperation of the OS and the application, it is possible to store an application program in the recording medium or the storage.
Further, it is possible to overlap the program on a carrier wave and to deliver the program through the communication network. For example, the program can be stored in the server on the communication network and the program can be delivered through the network. Then, the eyelid detection apparatus can be configured by starting the program and executing the program under the control of the OS, in the same way as other application programs.
The eyelid detection apparatus, the eyelid detection method and the program therefor detects, for example, the eye of the driver, or the like, who drives a moving object, for example, a vehicle, or the like.
According to the embodiments, the CPU 24 calculates the evaluation value, which indicates the possibility that the eyelid region of the image stored in the image memory 22, the eyelid region including both ends of the line which is the candidate of the lower eyelid extracted by the CPU 24, includes at least one of the outer and inner corners of the eye.
According to the embodiments, the CPU 24 calculates the average of intensity of the plural pixels in the eyelid region of the image stored in the image memory 22, the eyelid region including both ends of the line which is the candidate of the lower eyelid extracted by the CPU 24, and calculates the evaluation value which indicates the possibility that the eyelid region of the image stored in the image memory 22, the eyelid region including both ends of the line which is the candidate of the lower eyelid extracted by the CPU 24, includes at least one of the outer and inner corners of the eye on the basis of the calculated average of the intensity of the plural pixels.
According to the embodiments, the eyelid detection apparatus 50 includes the ROM 23 for storing the pattern of the outer or inner corner of the eye which represents the part corresponding to the skin part and the part corresponding to the eye part, the pattern of which the area is equal to that of the eyelid region including the both ends of the line. The CPU 24 calculates a difference between the average of intensity of the plural pixels of the part of the image stored in the image memory 22, the part corresponding to the skin part which is represented by the pattern stored in the ROM 23, and the average of intensity of the plural pixels of the part of the image stored in the image memory, the part corresponding to the eye part which is represented by the pattern stored in the pattern storing means, and detects the eyelid on the basis of the difference.
According to the second embodiment, the eyelid detection apparatus 50 includes the ROM 23 for storing the pattern of the outer or inner corner of the eye which represents the part corresponding to the skin part and the part corresponding to the eye part, the pattern of which the area is smaller than the eyelid region including the both ends of the line. The CPU 24 applies the pattern stored in the image memory 22 to the part of the eyelid region including the both ends of the line to calculate the temporal evaluation value, in other words, the difference between the average of intensity of the plural pixels of the part of the image stored in the image memory 22, the part corresponding to the skin part represented by the pattern, and the average of intensity of the plural pixels of the part of the image stored in the image memory 22, the part corresponding to the eye part represented by the pattern stored in the ROM 23, determines the largest temporal evaluation value of the temporal evaluation values calculated by the CPU 24 by scanning the eyelid region including the both ends of the line as the evaluation value, and detects the eyelid on the basis of the evaluation value.
According to the embodiments, the CPU 24 detects the right and left eyelids of the subject.
According to the embodiments, eyelid candidates, which have largest and second largest evaluation values calculated by the CPU 24, are detected as the right and left eyelids by the CPU 24.
According to the embodiments, the eyelid detection method includes processes of processing the face image to extract the pair of lines, which becomes the candidate of the combination of the upper eyelid and the lower eyelid S300, calculating the evaluation value which indicates the possibility that the extracted pair of lines which becomes the candidate of the combination of the upper eyelid and the lower eyelid, includes at least one of the outer or inner corners of the eye S440, S570, and detecting the position of the eyelid of the subject on the basis of the calculated evaluation value S470, S600.
According to the embodiments, a program instructs the computer 14 to store the image of the face of the subject, to process the image stored in the image memory 22 and to extract the pair of lines which becomes the candidate of the combination of the line corresponding to the upper eyelid and the line corresponding to the lower eyelid, to calculate the evaluation value which indicates possibility that the part of the image stored in the CPU 24, the part corresponding to the pair of lines extracted by the CPU 24, includes at least one of the outer or inner corner of the eye, and to detect the position of the eyelid of the subject on the basis of the evaluation value calculated by the CPU 24.
According to the embodiments of the present invention, the eyelid detection apparatus, the eyelid detection method and the program therefor, which can detect the eyelid by minimal calculations, can be provided.
The principles, preferred embodiment and mode of operation of the present invention have been described in the foregoing specification. However, the invention which is intended to be protected is not to be construed as limited to the particular embodiments disclosed. Further, the embodiments described herein are to be regarded as illustrative rather than restrictive. Variations and changes may be made by others, and equivalents employed, without departing from the spirit of the present invention. Accordingly, it is expressly intended that all such variations, changes and equivalents which fall within the spirit and scope of the present invention as defined in the claims, be embraced thereby.
Number | Date | Country | Kind |
---|---|---|---|
2007-066780 | Mar 2007 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
5805720 | Suenaga et al. | Sep 1998 | A |
7426287 | Yoon et al. | Sep 2008 | B2 |
20050063568 | Sun et al. | Mar 2005 | A1 |
20060098867 | Gallagher | May 2006 | A1 |
20060291702 | Miessbacher | Dec 2006 | A1 |
Number | Date | Country |
---|---|---|
1 669 909 | Jun 2006 | EP |
2000-123148 | Apr 2000 | JP |
2000-137792 | May 2000 | JP |
2000-311248 | Nov 2000 | JP |
Number | Date | Country | |
---|---|---|---|
20080226139 A1 | Sep 2008 | US |