Eyelid detection method, apparatus, device, and storage medium
By using an event camera and alternating infrared light sources, eye event maps are acquired, solving the problems of high resource consumption and low efficiency in existing eyelid detection methods, and achieving efficient and accurate eyelid detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing eyelid detection methods rely on facial landmark detection, which is resource-intensive and inefficient. Deep learning algorithms, on the other hand, have high CPU usage and long detection times.
An event camera is used to capture time-lapse images. By alternately lighting two sets of infrared light sources, a first eye event image and a second eye event image are obtained. The positions of the upper and lower eyelids are determined based on the images.
It improves the accuracy and efficiency of eyelid detection, reduces computational load, and decreases resource consumption.
Smart Images

Figure CN117197879B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of eye-tracking technology, and in particular to an eyelid detection method, device, equipment and storage medium. Background Technology
[0002] Existing eyelid detection methods obtain the key points corresponding to the eyelids through facial landmark detection, thereby achieving eyelid detection. Facial landmark detection is usually implemented using deep learning. However, deep learning algorithms have high CPU usage and require a long time to detect facial landmarks. Therefore, existing methods are resource-intensive and inefficient. Summary of the Invention
[0003] This invention provides an eyelid detection method, apparatus, device, and storage medium. By using a time-map captured by an event camera, eyelid detection can be achieved, thereby improving the accuracy and efficiency of eyelid detection.
[0004] In a first aspect, embodiments of the present invention provide an eyelid detection method, comprising:
[0005] Acquire a first eye event image and a second eye event image; wherein, the first eye event image is an image captured by an event DVS camera when the first group of infrared light sources illuminates the eye, and the second eye event image is an image captured by the DVS camera when the second group of infrared light sources illuminates the eye; the first group of infrared light sources and the second group of infrared light sources are illuminated alternately;
[0006] The positions of the upper and lower eyelids are determined based on the first and second eye event maps.
[0007] Secondly, embodiments of the present invention also provide an eyelid detection device, comprising:
[0008] An eye event image acquisition module is used to acquire a first eye event image and a second eye event image; wherein, the first eye event image is an image captured by an event DVS camera when the eye is illuminated by a first group of infrared light sources, and the second eye event image is an image captured by the DVS camera when the eye is illuminated by a second group of infrared light sources; the first group of infrared light sources and the second group of infrared light sources are illuminated alternately;
[0009] The eyelid position determination module is used to determine the position of the upper eyelid and the lower eyelid based on the first eye event map and the second eye event map.
[0010] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0011] At least one processor; and
[0012] A memory communicatively connected to the at least one processor; wherein,
[0013] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the eyelid detection method described in the embodiments of the present invention.
[0014] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer instructions that are used to cause a processor to execute the eyelid detection method described in the embodiments of the present invention.
[0015] This invention discloses an eyelid detection method, apparatus, device, and storage medium. The method involves acquiring a first eye event image and a second eye event image. The first eye event image is an image captured by an event-driven DVS camera when the eye is illuminated by a first set of infrared light sources, and the second eye event image is an image captured by a DVS camera when the eye is illuminated by a second set of infrared light sources. The first and second sets of infrared light sources are alternately illuminated. The positions of the upper and lower eyelids are determined based on the first and second eye event images. The eyelid detection method provided by this invention determines the positions of the upper and lower eyelids based on two eye event images acquired when the eye is illuminated by two alternately illuminated sets of infrared light sources, which can improve the accuracy and efficiency of eyelid detection. Attached Figure Description
[0016] Figure 1 This is a flowchart of an eyelid detection method according to Embodiment 1 of the present invention;
[0017] Figure 2 This is an example diagram of the infrared light source in Embodiment 1 of the present invention;
[0018] Figure 3a This is a diagram of the first eye event in Embodiment 1 of the present invention;
[0019] Figure 3b This is the second eye event diagram in Embodiment 1 of the present invention;
[0020] Figure 4a This is the third eye event diagram in Embodiment 1 of the present invention;
[0021] Figure 4b This is the fourth eye event diagram in Embodiment 1 of the present invention;
[0022] Figure 5 This is a schematic diagram showing the determined positions of the upper and lower eyelids in Embodiment 1 of the present invention;
[0023] Figure 6 This is a schematic diagram of the structure of an eyelid detection device according to Embodiment 2 of the present invention;
[0024] Figure 7 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0025] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0026] Example 1
[0027] Figure 1 This is a flowchart of an eyelid detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to the detection of eyelids in eye images. The method can be executed by an eyelid detection device and specifically includes the following steps:
[0028] Step 110: Obtain the first eye event map and the second eye event map.
[0029] The first eye event image is an image captured by an event DVS camera when the first group of infrared light sources illuminates the eye, and the second eye event image is an image captured by a DVS camera when the second group of infrared light sources illuminates the eye; the first group of infrared light sources and the second group of infrared light sources are lit alternately.
[0030] The principle of a Dynamic Vision Sensor (DVS) can be understood as follows: when the brightness change of a pixel reaches a certain threshold, an event is output. The brightness change is understood to be related to the change in brightness, but not to the absolute value of the brightness. When the brightness change reaches a certain threshold, data will be output. This threshold is an inherent parameter of the camera and can be set.
[0031] In this setup, the first and second groups of infrared light sources are positioned vertically relative to each other. The first group can be considered as the uppermost group, and the second group as the lowermost group. This vertical relative position means that all infrared light sources on the eye-tracking device are evenly distributed, dividing the light sources into two equal groups, one vertical and one horizontal. For example... Figure 2 This is an example diagram of the infrared light source in this embodiment, such as... Figure 2As shown, the eight infrared lights are evenly distributed, divided into two groups: four lights on top and four lights on the bottom. The vertical relative position of the two groups can also be understood as follows: the infrared lights within each group are evenly distributed, and there is a certain distance between the two groups. In this embodiment, while ensuring the vertical relative position of the two groups of infrared lights, the placement of the light sources within each group is not limited.
[0032] In this embodiment, the skin is more sensitive to changes in light than the pupil and iris; therefore, when the upper and lower sets of infrared light sources are alternately illuminated, the pixel values of the eyelids change more significantly. For example, Figure 3a This is the first eye event diagram in this embodiment, that is, the event diagram output by the DVS camera when a group of infrared light sources located at the upper position are lit; Figure 3b This is the second eye event diagram in this embodiment, that is, the event diagram output by the DVS camera when a group of infrared light sources located at the lower position is lit.
[0033] Step 120: Determine the position of the upper eyelid and the lower eyelid based on the first eye event map and the second eye event map.
[0034] In this embodiment, when the first set of infrared light sources is lit, the light is mainly concentrated in the area where the upper eyelid is located, and when the second set of infrared light sources is lit, the light is mainly concentrated in the area where the lower eyelid is located. Therefore, it is necessary to first extract the area where the upper eyelid is located from the first eye event map and extract the area where the lower eyelid is located from the second eye event map.
[0035] Optionally, the method for determining the upper and lower eyelid positions based on the first and second eye event images can be as follows: extracting regions with pixel values greater than those in the second eye event image from the first eye event image and defining them as the third eye event image; extracting regions with pixel values greater than those in the first eye event image from the second eye event image and defining them as the fourth eye event image; determining the upper eyelid position based on the third eye event image; and determining the lower eyelid position based on the fourth eye event image.
[0036] Specifically, the pixels in the first and second eye event images are compared one-to-one. The region in the first eye event image with a pixel value greater than that in the second eye event image can be considered the area where the upper eyelid is located. This region is extracted from the first eye event image and designated as the third eye event image, from which the upper eyelid position is determined. Similarly, the region in the second eye event image with a pixel value greater than that in the first eye event image can be considered the region where the lower eyelid is located. This region is extracted from the second eye event image and designated as the fourth eye event image, from which the upper eyelid position is determined. For example... Figure 4a This is the third eye event diagram in this embodiment. Figure 4b This is the fourth eye event diagram in this embodiment.
[0037] Optionally, the method for determining the upper eyelid position based on the third eye event image can be as follows: divide the pixels in the third eye image into groups of a set number of consecutive rows to obtain multiple groups of pixels, calculate the sum or mean of gray values of each group of pixels, if the sum or mean of gray values is greater than a set value, then determine the group of pixels as a candidate group, determine the row number of any row in the candidate group as the index number of the candidate group, store the index number in an array, and determine the row of pixels corresponding to the largest index number as the upper eyelid position.
[0038] In this context, any row can be understood as the row corresponding to the largest, smallest, or middle row number in a candidate group. If the largest row number in a candidate group is chosen as the index, then the largest row number is selected as the index for each candidate group. For example, suppose the third eye image contains 10 rows of pixels, with the row numbers increasing from 1 to 10 from top to bottom. Assuming there are 5 rows, meaning every 5 rows form a group, the groups would be: rows 1-5, rows 2-6, ..., rows 6-10, for a total of 6 groups. If the calculated groups 3-7, 4-8, and 5-9 satisfy a sum or mean grayscale value greater than a set value, then these three groups are considered candidate groups. Assuming the largest row number in the candidate group is used as the index, then the index number for the group with rows 3-7 is 7, the index number for the group with rows 4-8 is 8, and the index number for the group with rows 5-9 is 9. Finally, the position of the pixel in the row with index number 9 (i.e., row number 9) is determined as the upper eyelid position. Determining the upper eyelid position based on the pixel values of pixels in consecutive rows can improve the accuracy of upper eyelid determination.
[0039] Optionally, the method for determining the upper eyelid position based on the third eye event map can be as follows: read the pixels of the third eye event map row by row in a bottom-to-top order, and divide the read pixels into a group of a set number of consecutive rows; calculate the sum or average gray value of the read group of pixels; determine whether the sum or average gray value is greater than a first set value; if the sum or average gray value is greater than the first set value, determine the upper eyelid position based on the location of the read group of pixels; if the sum or average gray value is less than or equal to the first set value, continue reading the pixels in a set number of consecutive rows until the sum or average gray value of the read group of pixels is greater than the first set value.
[0040] The number of rows can be set to any value between 5 and 10, for example, 5 rows; there is no limitation here. The first set value can be set to any value between 50 and 100, for example, 50; there is no limitation here. In this embodiment, the row numbers of the pixels in the third eye image are set in ascending order from top to bottom. Assuming there are N rows, the row numbers are 1 to N. Reading the pixels of the third eye event map row by row in descending order can be understood as starting from the Nth row. Assuming the number of rows is set to 5, the first set of pixels read is rows N, N-1, N-2, N-3, and N-4; the second set of pixels read is rows N-1, N-2, N-3, N-4, and N-5; and so on.
[0041] In this embodiment, if the sum or average grayscale value of a group of pixels read is greater than a first preset value, reading stops, and the position of any row of pixels in the currently read group is determined as the upper eyelid position. If the sum or average grayscale value of a group of pixels read is less than or equal to the first preset value, reading continues for a set number of consecutive rows of pixels until the sum or average grayscale value of the read group of pixels is greater than the first preset value. Here, any row of pixels can be understood as the pixel corresponding to the largest row number, the smallest row number, or the middle row number in the read group of pixels. In this embodiment, pixels are read directly from bottom to top, eliminating the need to calculate the pixels of the entire third eye event map, which greatly reduces the computational load.
[0042] Optionally, the method for determining the lower eyelid position based on the fourth eye event image can be as follows: divide the pixels in the fourth eye image into groups of a set number of consecutive rows to obtain multiple groups of pixels, calculate the sum or mean of gray values of each group of pixels, if the sum or mean of gray values is greater than a set value, then determine the group of pixels as a candidate group, determine the row number of any row in the candidate group as the index number of the candidate group, store the index number in an array, and determine the row of pixels corresponding to the smallest index number as the lower eyelid position.
[0043] In this context, any row can be understood as the row corresponding to the largest, smallest, or middle row number in a candidate group. If the largest row number in a candidate group is chosen as the index, then the largest row number is selected as the index for each candidate group. For example, suppose the fourth eye image contains 10 rows of pixels, with the row numbers increasing from 1 to 10 from top to bottom. Assuming there are 5 rows, meaning every 5 rows of pixels form a group, the groups would be: rows 1-5, rows 2-6, ..., rows 6-10, for a total of 6 groups. If the calculated sum or mean of the grayscale values in groups 1-5, 2-6, and 4-8 is greater than a set value, then these three groups are considered candidate groups. Assuming the smallest row number in the candidate group is used as the index number, then the index number for the group with rows 1-5 is 1, the index number for the group with rows 2-6 is 2, and the index number for the group with rows 4-8 is 4. Finally, the position of the pixel in the row with index number 1 (i.e., row number 1) is determined as the lower eyelid position. Determining the lower eyelid position based on the pixel values of pixels in consecutive rows can improve the accuracy of upper eyelid determination.
[0044] Optionally, the method for determining the lower eyelid position based on the fourth eye event map can be as follows: read the pixels of the fourth eye event map row by row in a top-to-bottom order, and divide the read pixels into a group of a set number of consecutive rows; calculate the sum or average grayscale value of the read group of pixels; determine whether the sum or average grayscale value is greater than a second set value; if the sum or average grayscale value is greater than the second set value, then determine the lower eyelid position based on the location of the read group of pixels; if the sum or average grayscale value is less than or equal to the second set value, then continue reading the pixels in a set number of consecutive rows until the sum or average grayscale value of the read group of pixels is greater than the second set value.
[0045] The number of rows can be set to any value between 5 and 10, for example, 5 rows; there is no limitation here. The second setting value can be set to any value between 50 and 100, for example, 50; there is no limitation here. In this embodiment, the row numbers of the pixels in the fourth eye image are set in ascending order from top to bottom. Assuming there are N rows, the row numbers are 1 to N. Reading the pixels of the fourth eye event image row by row in ascending order can be understood as starting from row 1. Assuming the number of rows is set to 5, the first set of pixels read is rows 1, 2, 3, 4, and 5; the second set of pixels read is rows 2, 3, 4, 5, and 6; and so on.
[0046] For example, Figure 5 This is a schematic diagram showing the positions of the upper and lower eyelids as determined in this embodiment, as shown below. Figure 5As shown, the upper white line corresponds to the upper eyelid position, and the lower white line corresponds to the lower eyelid position.
[0047] In this embodiment, if the sum or average grayscale value of a group of pixels read is greater than a first preset value, reading stops, and the position of any row of pixels in the currently read group is determined as the lower eyelid position. If the sum or average grayscale value of a group of pixels read is less than or equal to the first preset value, reading continues for a set number of consecutive rows of pixels until the sum or average grayscale value of the read group of pixels is greater than the first preset value. Here, any row of pixels can be understood as the pixel corresponding to the largest row number, the smallest row number, or the middle row number in the read group of pixels. In this embodiment, pixels are read directly from top to bottom, eliminating the need to calculate the pixels of the entire fourth eye event map, which greatly reduces the computational load.
[0048] The technical solution of this embodiment involves acquiring a first eye event image and a second eye event image. The first eye event image is an image captured by an event-driven DVS camera when the eye is illuminated by a first set of infrared light sources, and the second eye event image is an image captured by a DVS camera when the eye is illuminated by a second set of infrared light sources. The first and second sets of infrared light sources are alternately illuminated. The positions of the upper and lower eyelids are determined based on the first and second eye event images. The eyelid detection method provided by this embodiment of the invention determines the positions of the upper and lower eyelids based on two eye event images acquired when the eye is illuminated by two alternately illuminated sets of infrared light sources, which can improve the accuracy and efficiency of eyelid detection.
[0049] Example 2
[0050] Figure 6 This is a schematic diagram of the structure of an eyelid detection device provided in Embodiment 2 of the present invention, as shown below. Figure 6 As shown, the device includes:
[0051] The eye event image acquisition module 610 is used to acquire a first eye event image and a second eye event image; wherein, the first eye event image is an image captured by an event DVS camera when the first group of infrared light sources illuminates the eye, and the second eye event image is an image captured by the DVS camera when the second group of infrared light sources illuminates the eye; the first group of infrared light sources and the second group of infrared light sources are alternately illuminated;
[0052] The eyelid position determination module 620 is used to determine the position of the upper eyelid and the lower eyelid based on the first eye event map and the second eye event map.
[0053] Optionally, the first group of infrared light sources and the second group of infrared light sources are in a vertically relative position.
[0054] Optionally, the eyelid position determination module 620 is also used for:
[0055] The region with a pixel value greater than that in the second eye event map is extracted from the first eye event map and identified as the third eye event map;
[0056] The region with a pixel value greater than that in the first eye event map is extracted from the second eye event map and identified as the fourth eye event map;
[0057] The position of the upper eyelid is determined based on the third eye event diagram;
[0058] The lower eyelid position is determined based on the fourth eye event diagram.
[0059] Optionally, the eyelid position determination module 620 is also used for:
[0060] The pixels of the third eye event map are read row by row in order from bottom to top, and the pixels read in consecutive rows of a set number are divided into a group.
[0061] Calculate the sum or average grayscale value of a set of pixels read from the database.
[0062] Determine whether the sum of the gray values or the average gray value is greater than a first set value;
[0063] If the sum or average of the gray values is greater than the first set value, the position of the upper eyelid is determined based on the location of a set of pixels read from the table.
[0064] If the sum or average grayscale value is less than or equal to the first set value, then continue reading a set number of consecutive rows of pixels until the sum or average grayscale value of a group of pixels read is greater than the first set value.
[0065] Optionally, the eyelid position determination module 620 is also used for:
[0066] The position of any row of pixels in a set of read pixels is determined as the position of the upper eyelid.
[0067] Optionally, the eyelid position determination module 620 is also used for:
[0068] Read the pixels of the fourth eye event map in a row from top to bottom, and divide the pixels of a set number of consecutive rows into a group;
[0069] Calculate the sum or average grayscale value of a set of pixels read from the database.
[0070] Determine whether the sum of grayscale values or the average grayscale value is greater than a second preset value;
[0071] If the sum or average of the gray values is greater than the second set value, the position of the lower eyelid is determined based on the location of a set of pixels read from the table.
[0072] If the sum of gray values or the average gray value is less than or equal to the second set value, then continue reading a set number of consecutive rows of pixels until the sum of gray values or the average gray value of a group of pixels read is greater than the second set value.
[0073] Optionally, the eyelid position determination module 620 is also used for:
[0074] The position of any row of pixels in a set of read pixels is determined as the lower eyelid position.
[0075] Optionally, any row of pixels can be the pixel corresponding to the largest row number, the pixel corresponding to the smallest row number, or the pixel corresponding to the middle row number in a set of pixels read.
[0076] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.
[0077] Example 3
[0078] Figure 7 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0079] like Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0080] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0081] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the eyelid detection method.
[0082] In some embodiments, the eyelid detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method XXX described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the eyelid detection method by any other suitable means (e.g., by means of firmware).
[0083] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0084] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0085] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0086] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including image input, voice input, or tactile input).
[0087] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0088] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0089] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0090] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for detecting eyelids, characterized in that, include: Acquire a first eye event image and a second eye event image; wherein, the first eye event image is an image captured by an event DVS camera when the first group of infrared light sources illuminates the eye, and the second eye event image is an image captured by the DVS camera when the second group of infrared light sources illuminates the eye; the first group of infrared light sources and the second group of infrared light sources are illuminated alternately; The positions of the upper and lower eyelids are determined based on the first and second eye event diagrams; wherein the first group of infrared light sources and the second group of infrared light sources are in a vertically relative position. The determination of the upper and lower eyelid positions based on the first and second eye event maps includes: The region with a pixel value greater than that in the second eye event map is extracted from the first eye event map and identified as the third eye event map; The region with a pixel value greater than that in the first eye event map is extracted from the second eye event map and identified as the fourth eye event map; The position of the upper eyelid is determined based on the third eye event diagram; The lower eyelid position is determined based on the fourth eye event diagram.
2. The method according to claim 1, characterized in that, Determining the upper eyelid position based on the third eye event diagram includes: The pixels of the third eye event map are read row by row in order from bottom to top, and the pixels read in consecutive rows of a set number are divided into a group. Calculate the sum or average grayscale value of a set of pixels read from the database. Determine whether the sum of the gray values or the average gray value is greater than a first set value; If the sum or average of the gray values is greater than the first set value, the position of the upper eyelid is determined based on the location of a set of pixels read from the table. If the sum or average grayscale value is less than or equal to the first set value, then continue reading a set number of consecutive rows of pixels until the sum or average grayscale value of a group of pixels read is greater than the first set value.
3. The method according to claim 2, characterized in that, The upper eyelid position is determined based on the location of a set of pixels read from the database, including: The position of any row of pixels in a set of read pixels is determined as the position of the upper eyelid.
4. The method according to claim 1, characterized in that, Determining the lower eyelid position based on the fourth eye event diagram includes: Read the pixels of the fourth eye event map in a row from top to bottom, and divide the pixels of a set number of consecutive rows into a group; Calculate the sum or average grayscale value of a set of pixels read from the database. Determine whether the sum of grayscale values or the average grayscale value is greater than a second preset value; If the sum or average of the gray values is greater than the second set value, the position of the lower eyelid is determined based on the location of a set of pixels read from the table. If the sum of gray values or the average gray value is less than or equal to the second set value, then continue reading a set number of consecutive rows of pixels until the sum of gray values or the average gray value of a group of pixels read is greater than the second set value.
5. The method according to claim 4, characterized in that, The lower eyelid position is determined based on the location of a set of pixels read from the database, including: The position of any row of pixels in a set of read pixels is determined as the lower eyelid position.
6. The method according to claim 3 or 5, characterized in that, The pixel in any row is the pixel corresponding to the largest row number, the pixel corresponding to the smallest row number, or the pixel corresponding to the middle row number in a set of pixels read.
7. An eyelid detection device, characterized in that, The device is used to perform the eyelid detection method according to any one of claims 1-6, comprising: An eye event image acquisition module is used to acquire a first eye event image and a second eye event image; wherein, the first eye event image is an image captured by an event DVS camera when the eye is illuminated by a first group of infrared light sources, and the second eye event image is an image captured by the DVS camera when the eye is illuminated by a second group of infrared light sources; the first group of infrared light sources and the second group of infrared light sources are illuminated alternately; The eyelid position determination module is used to determine the position of the upper eyelid and the lower eyelid based on the first eye event map and the second eye event map.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the eyelid detection method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the eyelid detection method according to any one of claims 1-6.
Citation Information
Patent Citations
Visual attention detection method based on eyeball movement and system thereof
CN110623629A
Infrared sensing of eye and eyelid movements to detect drowsiness
US20160225244A1
State detection device, state detection system, and state detection method
US20220161654A1