Eyelid detection methods, devices, equipment and storage media
Patent Information
- Application Number
- CN202210307486.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-03-25
AI Technical Summary
人脸关键点检测通常采用深度学习的方式实现,然而深度学习算法对CPU的占用率较高,需要花费较长的时间才能检测出人脸关键点,因此,现有的方法资源消耗高且效率低
[0017] This invention discloses an eyelid detection method, apparatus, device, and storage medium. The method involves extracting upper and lower eyelid images from an infrared eye image; identifying eyelashes on the upper eyelid image and determining the upper eyelid position based on the identified eyelashes; and determining the lower eyelid position based on the pixel values of each pixel in the lower eyelid image. The eyelid detection method provided by this invention, which determines the upper eyelid position from the extracted upper eyelid image and the lower eyelid position from the extracted lower eyelid image, can detect eyelids effectively, reducing resource consumption and improving efficiency.
Smart Images

Figure CN116844218B_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, which can detect eyelids, reduce resource consumption, and improve efficiency.
[0004] In a first aspect, embodiments of the present invention provide an eyelid detection method, comprising:
[0005] Extract the upper and lower eyelid images from the infrared eye image;
[0006] The upper eyelid image is subjected to eyelash recognition, and the upper eyelid position is determined based on the recognized eyelashes;
[0007] The position of the lower eyelid is determined based on the pixel values of each pixel in the lower eyelid image.
[0008] Secondly, embodiments of the present invention also provide an eyelid detection device, comprising:
[0009] The eyelid image extraction module is used to extract the upper and lower eyelid images from the infrared eye image;
[0010] The upper eyelid position determination module is used to identify eyelashes on the upper eyelid image and determine the upper eyelid position based on the identified eyelashes.
[0011] The lower eyelid position determination module is used to determine the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image.
[0012] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] 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.
[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the eyelid detection method described in the embodiments of the present invention.
[0017] This invention discloses an eyelid detection method, apparatus, device, and storage medium. The method involves extracting upper and lower eyelid images from an infrared eye image; identifying eyelashes on the upper eyelid image and determining the upper eyelid position based on the identified eyelashes; and determining the lower eyelid position based on the pixel values of each pixel in the lower eyelid image. The eyelid detection method provided by this invention, which determines the upper eyelid position from the extracted upper eyelid image and the lower eyelid position from the extracted lower eyelid image, can detect eyelids effectively, reducing resource consumption and improving efficiency. Attached Figure Description
[0018] Figure 1 This is a flowchart of an eyelid detection method according to Embodiment 1 of the present invention;
[0019] Figure 2a This is an example diagram of the infrared eye diagram in Embodiment 1 of the present invention;
[0020] Figure 2b This is an example diagram of the upper eyelid in Embodiment 1 of the present invention;
[0021] Figure 2c This is an example diagram of the lower eyelid in Embodiment 1 of the present invention;
[0022] Figure 3 This is a binarized image of eyelashes in Embodiment 1 of the present invention;
[0023] Figure 4 This is an example diagram illustrating the determination of the upper eyelid position in Embodiment 1 of the present invention;
[0024] Figure 5 This is an example diagram illustrating the determination of the upper and lower eyelid positions in Embodiment 1 of the present invention;
[0025] Figure 6 This is a schematic diagram of the structure of an eyelid detection device according to Embodiment 2 of the present invention;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0027] 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.
[0028] Example 1
[0029] 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 both upper and lower eyelids. The method can be executed by an eyelid detection device, such as... Figure 1 As shown, the method specifically includes the following steps:
[0030] S110, extract the upper and lower eyelid images from the infrared eye image.
[0031] The infrared eye map can be an image of the user's eyes captured by an infrared camera, which can be mounted on an eye-tracking device. For example, Figure 2a This is an example diagram of the infrared eye diagram in this embodiment, such as... Figure 2a As shown, the infrared eye image contains the eye, and there are reflected light spots on the iris. The upper eyelid image can be understood as a sub-image containing the upper eyelid region, and the lower eyelid image can be understood as a sub-image containing the lower eyelid region.
[0032] Specifically, the method for extracting the upper and lower eyelid images from the infrared eye image can be as follows: perform pupil detection on the infrared eye image; if a pupil is detected, determine the image above the pupil area as the upper eyelid image, and determine the image below the pupil area as the lower eyelid image.
[0033] The pupil detection method can employ any existing pupil detection technology, and is not limited here. In this embodiment, after a pupil is detected, the image of the upper part of the pupil area is determined as the upper eyelid image, and the image of the lower part of the pupil area is determined as the lower eyelid image. For example, Figure 2b This is an example image of the upper eyelid. Figure 2c This is an example image of the lower eyelid.
[0034] Specifically, if no pupil is detected, the image with the first set ratio on the left and right sides of the infrared eye image is cropped to obtain the upper eyelid image; the image below the upper eyelid position in the infrared eye image is determined as the lower eyelid image.
[0035] The first set ratio can be set to 1 / 4, which means cropping out the left and right quarters of the infrared eye image. In this embodiment, if no pupil is detected, it indicates that the eye in the current infrared eye image is in a half-closed or fully closed state, and the image with the left and right quarters cropped out is used as the upper eyelid image.
[0036] In this embodiment, if no pupil is detected, the lower eyelid image can be determined based on the determined upper eyelid position, and the image below the upper eyelid position can be identified as the lower eyelid image. The method for determining the upper eyelid position can be found in the following embodiment.
[0037] Optionally, after determining the image above the pupil area as the upper eyelid image, the following step is also included: cropping the image of the upper eyelid image at a second predetermined ratio to the left and right to obtain the cropped upper eyelid image.
[0038] The second setting ratio can be set to 1 / 4, which means cropping out the left and right 1 / 4 of the upper eyelid image to obtain the cropped upper eyelid image. The position of the upper eyelid can then be determined based on the cropped upper eyelid image, which can greatly reduce the amount of calculation.
[0039] S120 performs eyelash recognition on the upper eyelid image and determines the position of the upper eyelid based on the recognized eyelashes.
[0040] In this embodiment, since there is a significant difference between the pixel values corresponding to the eyelash region and the pixel values corresponding to the skin region, a region growing method can be used for eyelash recognition.
[0041] Specifically, the method for eyelash recognition on the upper eyelid image can be as follows: perform region growth on the upper eyelid image to obtain multiple candidate eyelash regions; filter out regions in the multiple candidate eyelash regions whose width is greater than a first set value and whose length is less than a second set value to obtain the target eyelash region.
[0042] The process of performing region growing on the upper eyelid image can be as follows: traverse the pixels in the upper eyelid image, using the traversed pixels as seed points for region growing, thereby obtaining a binarized image of the eyelashes. For example, Figure 3 This is a binarized image of the eyelashes in this embodiment. For example... Figure 3 As shown, the white area represents the candidate eyelash regions obtained after region growth. From Figure 3 As can be seen, some white areas are clearly not eyelashes, so it is necessary to filter the candidate eyelash areas.
[0043] In this context, the width of the candidate eyelash region can be understood as the average width of the region. The first and second settings can be understood as the number of pixels; optionally, the first setting can be set to 5 and the second setting can be set to 15. This means filtering out regions from multiple candidate eyelash regions that are wider than 5 pixels and shorter than 15 pixels, leaving the target eyelash region. Specifically, after determining the target eyelash region, the upper eyelid position is determined based on the target eyelash region.
[0044] In this embodiment, the method for determining the upper eyelid position based on the target eyelash region can be: obtaining the position information of the two endpoints of each target eyelash region; and determining the position of the other endpoint corresponding to the highest endpoint as the upper eyelid position.
[0045] Specifically, the eyelash region contains two endpoints. The endpoint positions of each target eyelash region are obtained, and the position of the other endpoint corresponding to the highest endpoint is determined as the upper eyelid position; that is, the root position of the highest eyelash is taken as the upper eyelid position. For example, Figure 4 This is an example diagram illustrating the determination of the upper eyelid position in this embodiment, such as... Figure 4 As shown, the white line is the horizontal line where the upper eyelid is located.
[0046] S130, determine the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image.
[0047] Since the lower eyelid is located at the junction of the iris and skin, the line containing the lower eyelid can be determined by the position of the row of pixels with the largest pixel value change.
[0048] Specifically, the method for determining the lower eyelid position based on the pixel values of each pixel in the lower eyelid image can be as follows: traverse the pixels of the lower eyelid image row by row, divide the pixels of each set number of rows into a group, and obtain multiple groups of pixels; calculate the sum of the pixel values of each group of pixels; calculate the difference between the sums of the pixel values of two groups of pixels that meet a set condition; wherein, the set condition is that the two groups of pixels are spaced a set number of groups apart; and determine the position of the lower group of pixels in the two groups of pixels corresponding to the largest difference as the lower eyelid position.
[0049] The number of rows can be set to 5, meaning that every 5 rows of pixels are grouped together. For example, assuming the lower eyelid image contains 100 rows of pixels, rows 1-5 are grouped together, rows 2-6 together, rows 3-7 together, ..., rows 95-99 together, and rows 96-100 together, resulting in 96 groups of pixels, which are then sorted as group 1, group 2, group 3... group 96.
[0050] The number of groups can be set to an interval of 4 groups, that is, the difference between the sum of pixel values of the 5th group and the 1st group, the difference between the sum of pixel values of the 6th group and the 2nd group, ..., the difference between the sum of pixel values of the 96th group and the 92nd group.
[0051] If the group numbers are sorted from top to bottom, then the lower group of pixels in the two groups corresponding to the maximum difference can be understood as the group of pixels with the larger group number in the two groups corresponding to the maximum difference.
[0052] Specifically, the method to determine the position of the lower eyelid based on the position of the lower set of pixels in the two sets of pixels corresponding to the maximum difference can be: the straight line containing the first row of pixels in the lower set is determined as the straight line containing the lower eyelid.
[0053] Taking the above example: assuming the difference between the pixel values in group 20 and group 16 is the largest, then the straight line containing the first row of pixels in group 20 is determined as the straight line containing the lower eyelid. That is, the straight line containing the 20th row of pixels in the lower eyelid image is determined as the lower eyelid image. For example, Figure 5 This is an example diagram illustrating the determination of the upper and lower eyelid positions in this embodiment, such as... Figure 5 As shown, the white line at the top is the horizontal line where the upper eyelid is located, and the white line at the bottom is the horizontal line where the lower eyelid is located.
[0054] Optionally, before determining the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image, the method further includes: if the infrared eye image is tilted, rotating the infrared eye image so that the line connecting the two corners of the eyes is parallel to the horizontal line, and then extracting the lower eyelid image from the rotated infrared eye image.
[0055] The technical solution of this embodiment involves extracting upper and lower eyelid images from an infrared eye image; performing eyelash recognition on the upper eyelid image to determine the upper eyelid position based on the recognized eyelashes; and determining the lower eyelid position based on the pixel values of each pixel in the lower eyelid image. The eyelid detection method provided by this embodiment of the invention determines the upper eyelid position from the extracted upper eyelid image and the lower eyelid position from the extracted lower eyelid image, enabling eyelid detection. This not only reduces resource consumption for eyelid detection but also improves its efficiency.
[0056] Example 2
[0057] 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:
[0058] The eyelid image extraction module 610 is used to extract the upper and lower eyelid images from the infrared eye image;
[0059] The upper eyelid position determination module 620 is used to perform eyelash recognition on the upper eyelid image and determine the upper eyelid position based on the recognized eyelashes.
[0060] The lower eyelid position determination module 630 is used to determine the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image.
[0061] Optionally, the eyelid image cropping module 610 is also used for:
[0062] Pupil detection is performed on the infrared eye diagram;
[0063] If a pupil is detected, the image above the pupil region is designated as the upper eyelid image, and the image below the pupil region is designated as the lower eyelid image.
[0064] Optionally, the eyelid image cropping module 610 is also used for:
[0065] If no pupil is detected, the image of the infrared eye image with the first set ratio on the left and right sides is cropped to obtain the upper eyelid image;
[0066] The image below the upper eyelid position in the infrared eye image is determined as the lower eyelid image.
[0067] Optionally, it also includes: a cropping module for:
[0068] The upper eyelid image is cropped by removing the images of the left and right sides at a second predetermined ratio to obtain the cropped upper eyelid image.
[0069] Optionally, the upper eyelid position determination module 620 is also used for:
[0070] Region growing is performed on the upper eyelid image to obtain multiple candidate eyelash regions;
[0071] Filter out regions in the plurality of candidate eyelash regions whose width is greater than a first preset value and whose length is less than a second preset value to obtain the target eyelash region;
[0072] The upper eyelid position is determined based on the target eyelash area.
[0073] Optionally, the upper eyelid position determination module 620 is also used for:
[0074] Obtain the position information of the two endpoints of each target eyelash region;
[0075] The position of the other endpoint corresponding to the highest endpoint is determined as the upper eyelid position.
[0076] Optionally, the lower eyelid position determination module 630 is also used for:
[0077] The pixels of the lower eyelid image are traversed row by row, and the pixels of each set number of rows are divided into groups to obtain multiple groups of pixels.
[0078] Calculate the sum of pixel values for each group of pixels;
[0079] Calculate the difference between the sum of pixel values of two groups of pixels that satisfy a set condition; wherein, the set condition is a set number of groups of pixels apart.
[0080] The lower eyelid position is determined by the location of the lower set of pixels in the two sets of pixels corresponding to the maximum difference.
[0081] Optionally, the lower eyelid position determination module 630 is also used for:
[0082] The line containing the first row of pixels in the lower group is defined as the line containing the lower eyelid.
[0083] 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.
[0084] Example 3
[0085] 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.
[0086] like Figure 7 As 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.
[0087] 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.
[0088] 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.
[0089] In some embodiments, the eyelid detection method can 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 can 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 eyelid detection method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the eyelid detection method by any other suitable means (e.g., by means of firmware).
[0090] 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.
[0091] 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.
[0092] 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.
[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; 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 sound input, voice input, or tactile input).
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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: Extract the upper and lower eyelid images from the infrared eye image; The upper eyelid image is subjected to eyelash recognition, and the upper eyelid position is determined based on the recognized eyelashes; The position of the lower eyelid is determined based on the pixel values of each pixel in the lower eyelid image. The step of identifying eyelashes on the upper eyelid image includes: Region growing is performed on the upper eyelid image to obtain multiple candidate eyelash regions; Filter out regions in the plurality of candidate eyelash regions whose width is greater than a first preset value and whose length is less than a second preset value to obtain the target eyelash region; Accordingly, determining the upper eyelid position based on the identified eyelashes includes: The upper eyelid position is determined based on the target eyelash area; Determining the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image includes: The pixels of the lower eyelid image are traversed row by row, and the pixels of each set number of rows are divided into groups to obtain multiple groups of pixels. Calculate the sum of pixel values for each group of pixels; Calculate the difference between the sum of pixel values of two groups of pixels that satisfy a set condition; wherein, the set condition is a set number of groups of pixels apart. The lower eyelid position is determined by the location of the lower set of pixels in the two sets of pixels corresponding to the maximum difference.
2. The method according to claim 1, characterized in that, Extract the upper and lower eyelid images from the infrared eye image, including: Pupil detection is performed on the infrared eye diagram; If a pupil is detected, the image above the pupil region is designated as the upper eyelid image, and the image below the pupil region is designated as the lower eyelid image.
3. The method according to claim 2, characterized in that, Extract the upper and lower eyelid images from the infrared eye image, including: If no pupil is detected, the image of the infrared eye image with the first set ratio on the left and right sides is cropped to obtain the upper eyelid image; The image below the upper eyelid position in the infrared eye image is determined as the lower eyelid image.
4. The method according to claim 2, characterized in that, After identifying the portion of the image above the pupil area as the upper eyelid image, the following steps are also included: The upper eyelid image is cropped by removing the images of the left and right sides at a second predetermined ratio to obtain the cropped upper eyelid image.
5. The method according to claim 1, characterized in that, Determining the upper eyelid position based on the target eyelash region includes: Obtain the position information of the two endpoints of each target eyelash region; The position of the other endpoint corresponding to the highest endpoint is determined as the upper eyelid position.
6. The method according to claim 1, characterized in that, The lower eyelid position is determined by the location of the lower set of pixels among the two sets of pixels corresponding to the maximum difference, including: The line containing the first row of pixels in the lower group is defined as the line containing the lower eyelid.
7. An eyelid detection device, characterized in that, include: The eyelid image extraction module is used to extract the upper and lower eyelid images from the infrared eye image; The upper eyelid position determination module is used to identify eyelashes on the upper eyelid image and determine the upper eyelid position based on the identified eyelashes. The lower eyelid position determination module is used to determine the position of the lower eyelid based on the pixel values of each pixel in the lower eyelid image. The upper eyelid position determination module is further used for: Region growing is performed on the upper eyelid image to obtain multiple candidate eyelash regions; Filter out regions in the plurality of candidate eyelash regions whose width is greater than a first preset value and whose length is less than a second preset value to obtain the target eyelash region; The upper eyelid position is determined based on the target eyelash area. The lower eyelid position determination module is also used for: The pixels of the lower eyelid image are traversed row by row, and the pixels of each set number of rows are divided into groups to obtain multiple groups of pixels. Calculate the sum of pixel values for each group of pixels; Calculate the difference between the sum of pixel values of two groups of pixels that satisfy a set condition; wherein, the set condition is a set number of groups of pixels apart. The lower eyelid position is determined by the location of the lower set of pixels in the two sets of pixels corresponding to the maximum difference.
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
Eyelid detection apparatus, eyelid detection method and program therefor
CN101266647A
A method for calculating and identifying the upper and lower eyelids from the reduced likelihood image of the eye gray level
CN109376649A