IP Library Granted Patent US 11,430,264
Granted Patent B2
US 11,430,264 · App. 17/260,859 · Granted Aug 30, 2022

Eye open or closed state detection method and electronic device

Inventors: Hongbao Li (Shenzhen, CN); Chen Dong (Shenzhen, CN); Yongtao Jiang (Shenzhen, CN); Wenmei Gao (Beijing, CN)
Assignee: HONOR DEVICE CO., LTD.
G06V40/197G06K9/6267G06V10/457G06V10/72G06V40/193
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,430,264
App. No.
17/260,859
Granted
Aug 30, 2022
Kind
B2
Abstract

An eye open or closed state detection method, in addition to an eye opening feature, an iris shape feature and/or a vertical direction feature are added to identify the eye open or closed state, where the eye opening feature is used to represent an eye opening degree, the iris shape feature is used to represent a shape of an iris of an eye, and the vertical direction feature is used to represent a change degree of an eyelid curve.

Claims (90)

1. An eye open or closed state detection method, comprising:

obtaining a grayscale image of an eye on a human face in a to-be-processed face image;

extracting an eye feature from the grayscale image, wherein the eye feature comprises an eye opening feature, wherein the eye feature further comprises an iris shape feature or a vertical direction feature, wherein the eye opening feature represents an eye opening degree, wherein the iris shape feature represents a shape of the iris, and wherein the vertical direction feature represents a change degree of an eyelid curve;

obtaining a plurality of smallest pixels in a first plurality of pixels comprised in the grayscale image, wherein a smallest pixel of the smallest pixels comprises a smallest pixel value in a second plurality of pixels with a same horizontal coordinate in an image coordinate system, and wherein a quantity of the smallest pixels is equal to a quantity of selected horizontal coordinates;

obtaining the vertical direction feature based on vertical coordinates of the smallest pixels; and

identifying an eye open state or an eye closed state based on the eye feature.

2. The eye open or closed state detection method of claim 1 , further comprising:

performing binarization processing on the grayscale image to obtain a binary image of the grayscale image;

obtaining a convex set in a largest connected region of the binary image;

obtaining distances, in a horizontal direction and a vertical direction of an image coordinate system, between every two pixels comprised in the convex set;

determining a first largest distance of the distances in the horizontal direction;

determining a second largest distance of the distances in the vertical direction; and

determining the iris shape feature based on the first largest distance and the second largest distance, wherein the iris shape feature is a first ratio of the first largest distance to the second largest distance, a second ratio of the second largest distance to the first largest distance, or a smaller value of the first ratio and the second ratio.

3. The eye open or closed state detection method of claim 2 , further comprising:

traversing the grayscale image based on a specified rectangular window and a specified sliding step;

determining an average pixel value of pixels in the specified rectangular window to obtain a plurality of average pixel values; and

performing binarization processing on the grayscale image using a smallest pixel value in the average pixel values as a threshold.

4. The eye open or closed state detection method of claim 1 , further comprising:

obtaining a plurality of absolute values of differences between vertical coordinates of every two pixels with adjacent horizontal coordinates in the smallest pixels;

determining a plurality of feature scores corresponding to each of the absolute values; and

using a sum of the feature scores as the vertical direction feature.

5. The eye open or closed state detection method of claim 4 , wherein a feature score scoreV j corresponding to an absolute value V j is based on the following:

if A<V j ≤B , score V j =V j −A;

if B<V j ≤C , score V j =k 1*( V j −A );

if C<V j , score V j =k 2*( V j −A ),

wherein A, B, C, k1 and k2 are positive numbers, wherein k1<k2, and wherein A<B<C.

6. The eye open or closed state detection method of claim 1 , further comprising:

obtaining a plurality of grayscale images of eyes on human faces in a plurality of face images in a face image training library;

extracting eye features corresponding to the grayscale images;

constructing a classification model based on the eye features and pre-marked eye open states or pre-marked eye closed states corresponding to the grayscale images; and

identifying the eye open state or the eye closed state based on the eye features and the classification model.

7. An electronic device, comprising:

a processor; and

a memory coupled to the processor and configured to store instructions that, when executed by the processor, cause the electronic device to be configured to:

obtain a grayscale image of an eye on a human face in a to-be-processed face image;

extract an eye feature from the grayscale image, wherein the eye feature comprises an eye opening feature, wherein the eye feature further comprises an iris shape feature or a vertical direction feature, wherein the eye opening feature represents an eye opening degree, wherein the iris shape feature represents a shape of the iris, and wherein the vertical direction feature represents a change degree of an eyelid curve;

obtain a plurality of smallest pixels in a first plurality of pixels comprised in the grayscale image, wherein a smallest pixel of the smallest pixels comprises a smallest pixel value in a second plurality of pixels with a same horizontal coordinate in an image coordinate system, and wherein a quantity of the smallest pixels is equal to a quantity of selected horizontal coordinates;

obtain the vertical direction feature based on vertical coordinates of the smallest pixels; and

identify an eye open state or an eye closed state based on the eye feature.

8. The electronic device of claim 7 , wherein the instructions further cause the electronic device to be configured to:

perform binarization processing on the grayscale image to obtain a binary image of the grayscale image;

obtain a convex set in a largest connected region of the binary image;

obtain distances, in a horizontal direction and a vertical direction of an image coordinate system, between every two pixels comprised in the convex set;

determine a first largest distance of the distances in the horizontal direction;

determine a second largest distance of the distances in the vertical direction; and

determine the iris shape feature based on the first largest distance and the second largest distance, wherein the iris shape feature is a first ratio of the first largest distance to the second largest distance, a second ratio of the second largest distance to the first largest distance, or a smaller value of the first ratio and the second ratio.

9. The electronic device of claim 8 , wherein the instructions further cause the electronic device to be configured to:

traverse the grayscale image based on a specified rectangular window and a specified sliding step;

determine an average pixel value of pixels in the specified rectangular window to obtain a plurality of average pixel values; and

perform binarization processing on the grayscale image using a smallest pixel value in the average pixel values as a threshold.

10. The electronic device of claim 7 , wherein the instructions further cause the electronic device to be configured to:

obtain a plurality of absolute values of differences between vertical coordinates of every two pixels with adjacent horizontal coordinates in the smallest pixels;

determine a plurality of feature scores corresponding to each of the absolute values; and

use a sum of the feature scores as the vertical direction feature.

11. The electronic device of claim 10 , wherein a feature score scoreV j corresponding to an absolute value V j is based on the following:

if A<V j ≤B , score V j =V j −A;

if B<V j ≤C , score V j =k 1*( V j −A );

if C<V j , score V j =k 2*( V j −A ),

wherein A, B, C, k1 and k2 are positive numbers, wherein k1<k2, and wherein A<B<C.

12. The electronic device of claim 7 , wherein the instructions further cause the electronic device to be configured to:

obtain a plurality of grayscale images of eyes on human faces in a plurality of face images in a face image training library;

extract eye features corresponding to the grayscale images;

construct a classification model based on the eye features and pre-marked eye open states or pre-marked eye closed states corresponding to the grayscale images; and

identify the eye open state or the eye closed state based on the eye features and the classification model.

13. A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable medium that, when executed by a processor, cause an electronic device to:

obtain a grayscale image of an eye on a human face in a to-be-processed face image;

extract an eye feature from the grayscale image, wherein the eye feature comprises an eye opening feature, wherein the eye feature further comprises an iris shape feature or a vertical direction feature, wherein the eye opening feature represents an eye opening degree, wherein the iris shape feature represents a shape of the iris, and wherein the vertical direction feature represents a change degree of an eyelid curve;

obtain a plurality of smallest pixels in a first plurality of pixels comprised in the grayscale image, wherein a smallest pixel of the smallest pixels comprises a smallest pixel value in a second plurality of pixels with a same horizontal coordinate in an image coordinate system, and wherein a quantity of the smallest pixels is equal to a quantity of selected horizontal coordinates;

obtain the vertical direction feature based on vertical coordinates of the smallest pixels; and

identify an eye open state or an eye closed state based on the eye feature.

14. The computer program product of claim 13 , wherein the instructions further cause the electronic device to:

perform binarization processing on the grayscale image to obtain a binary image of the grayscale image;

obtain a convex set in a largest connected region of the binary image;

obtain distances, in a horizontal direction and a vertical direction of an image coordinate system, between every two pixels comprised in the convex set;

determine a first largest distance of the distances in the horizontal direction;

determine a second largest distance of the distances in the vertical direction; and

determine the iris shape feature based on the first largest distance and the second largest distance, wherein the iris shape feature is a first ratio of the first largest distance to the second largest distance, a second ratio of the second largest distance to the first largest distance, or a smaller value of the first ratio and the second ratio.

15. The computer program product of claim 14 , wherein the instructions further cause the electronic device to:

traverse the grayscale image based on a specified rectangular window and a specified sliding step;

determine an average pixel value of pixels in the specified rectangular window to obtain a plurality of average pixel values; and

perform binarization processing on the grayscale image by using a smallest pixel value in the average pixel values as a threshold.

16. The computer program product of claim 13 , wherein the instructions further cause the electronic device to:

obtain a plurality of absolute values of differences between vertical coordinates of every two pixels with adjacent horizontal coordinates in the smallest pixels;

determine a plurality of feature scores corresponding to each of the absolute values; and

use a sum of the feature scores as the vertical direction feature.

17. The computer program product of claim 13 , wherein the instructions further cause the electronic device to:

obtain a plurality of grayscale images of eyes on human faces in a plurality of face images in a face image training library;

extract eye features corresponding to the grayscale images;

construct a classification model based on the eye features and pre-marked eye open or pre-marked eye closed states corresponding to the grayscale images; and

identify the eye open state or the eye closed state based on the eye features and the classification model.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2021
From: HUAWEI TECHNOLOGIES CO., LTD.
To: HONOR DEVICE CO., LTD.
Reel/Frame 055919/0344 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2021
From: LI, HONGBAO; DONG, CHEN; JIANG, YONGTAO; GAO, WENMEI
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 054936/0221 →
Priority Claims (1)
CN 201810776284.1 · Jul 16, 2018 · national
Continuity (1)
Related Publication 20210264148A1 · Aug 26, 2021