Method, device and equipment for determining eye detection frame and storage medium

By extracting light spots, screening candidate light spots, and determining the pupil during the eye detection frame determination process, the problems of large computational load and long running time in the prior art are solved, and more efficient detection frame determination is achieved.

CN116486467BActive Publication Date: 2026-07-24BEIJING 7INVENSUN TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING 7INVENSUN TECH
Filing Date
2022-01-13
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing methods for determining eye detection frames involve large computational loads, long running times, and high CPU usage.

Method used

By extracting light spots from eye images, filtering candidate light spots, determining whether there is a pupil in the sub-region where the candidate light spot is located, and determining the detection box for both eyes based on the pupil information corresponding to the target light spots of both eyes.

Benefits of technology

This reduces the computational cost of determining the eye detection bounding box and improves the efficiency of the bounding box determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486467B_ABST
    Figure CN116486467B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method, device and equipment for determining an eye detection frame and a storage medium. A light spot in an eye image is extracted; the light spot is screened to obtain a candidate light spot; it is judged whether a pupil exists in a sub-region where the candidate light spot is located; the sub-region is a region of a set size containing the candidate light spot; if the pupil exists, the candidate light spot is determined as a target light spot; and a detection frame of both eyes is determined based on pupil information corresponding to the target light spot of both eyes. The method for determining an eye detection frame provided by the embodiments of the present application can reduce the calculation amount of the determination of the eye detection frame and improve the efficiency of the determination of the eye detection frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of eye-tracking technology, and in particular to a method, apparatus, device and storage medium for determining an eye detection frame. Background Technology

[0002] Existing methods for determining eye detection boxes mainly rely on deep learning, which has drawbacks such as high computational cost, long running time, and high CPU usage. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and storage medium for determining an eye detection frame, which can reduce the computational load and improve the efficiency of eye detection frame determination.

[0004] In a first aspect, embodiments of the present invention provide a method for determining an eye detection frame, comprising:

[0005] Extract the light spots from the eye image;

[0006] The light spots are screened to obtain candidate light spots;

[0007] Determine whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a predetermined size containing the candidate light spot;

[0008] If it exists, the candidate spot is determined as the target spot;

[0009] The detection frames for both eyes are determined based on the pupil information corresponding to the target light spots of both eyes.

[0010] Secondly, embodiments of the present invention also provide a device for determining an eye detection frame, comprising:

[0011] The light spot extraction module is used to extract light spots from eye images;

[0012] The candidate light spot acquisition module is used to filter the light spots and obtain candidate light spots;

[0013] A pupil detection module is used to determine whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a predetermined size containing the candidate light spot;

[0014] The target spot determination module is used to determine the candidate spot as the target spot if a pupil exists in the sub-region where the candidate spot is located;

[0015] The detection frame determination module is used to determine the detection frame for both eyes based on the pupil information corresponding to the target light spots of both eyes.

[0016] Thirdly, embodiments of the present invention also provide a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for determining an eye detection frame as described in the embodiments of the present invention.

[0017] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the method for determining an eye detection frame as described in the embodiments of the present invention.

[0018] This invention discloses a method, apparatus, device, and storage medium for determining eye detection frames. The method involves extracting light spots from an eye image; filtering the light spots to obtain candidate light spots; determining whether a pupil exists in a sub-region containing the candidate light spot; wherein the sub-region is a region of a predetermined size containing the candidate light spot; if a pupil exists, the candidate light spot is determined as the target light spot; and determining the detection frames for both eyes based on the pupil information corresponding to the target light spots of both eyes. The eye detection frame determination method provided by this invention, which determines the detection frames for both eyes based on the pupil information corresponding to the target light spots of both eyes, can reduce the computational load and improve the efficiency of eye detection frame determination. Attached Figure Description

[0019] Figure 1 This is a flowchart of a method for determining an eye detection frame according to Embodiment 1 of the present invention;

[0020] Figure 2 This is an example diagram of the binocular detection frame determined in Embodiment 1 of the present invention;

[0021] Figure 3 This is a schematic diagram of the structure of an eye detection frame determination device according to Embodiment 2 of the present invention;

[0022] Figure 4 This is a schematic diagram of the structure of a computer device according to Embodiment 3 of the present invention. Detailed Implementation

[0023] 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.

[0024] Example 1

[0025] Figure 1 This is a flowchart of a method for determining an eye detection frame according to Embodiment 1 of the present invention. This embodiment is applicable to the determination of an eye detection frame, and the method can be executed by an eye detection frame determining device, such as... Figure 1 As shown, the method specifically includes the following steps:

[0026] Step 110: Extract the light spots from the eye image.

[0027] The eye image can be an image captured when an infrared light source in an eye-tracking device illuminates the user's eyes, and the light spot can be a light spot formed when the infrared light source illuminates the pupil of the eye. The light spot is the area in the eye image whose brightness exceeds a set value.

[0028] Optionally, the method for extracting light spots in an eye image can be as follows: for each pixel in the eye image, determine the average gray value of the set area where the pixel is located; calculate the difference between the gray value of the pixel and the average gray value; if the difference is greater than a first set threshold, adjust the gray value of the pixel to the first set value; otherwise, adjust the gray value of the pixel to the second set value; and determine the area enclosed by the pixels with the first set gray value as the light spot.

[0029] The defined region containing a pixel can be a rectangular area of ​​a specified size centered on that pixel, such as a 3x3, 4x4, or 5x5 rectangle. The first set value can be 255, and the second set value can be 0. The average grayscale value of the defined region can be calculated by summing the grayscale values ​​of all pixels within the region and then dividing the sum by the number of pixels. Pixels whose grayscale value differs from the average grayscale value by more than a first set threshold are set to white, while pixels whose grayscale value differs from the average grayscale value by less than or equal to the first set threshold are set to black. In this embodiment, after binarizing the eye image, the area enclosed by pixels with a grayscale value of 255 is defined as the light spot.

[0030] Step 120: Screen the light spots to obtain candidate light spots.

[0031] The criteria for selecting light spots can be based on information such as the size and aspect ratio of the light spots.

[0032] Specifically, the method for screening light spots to obtain candidate light spots can be: selecting light spots whose size information and aspect ratio both meet the first set conditions as candidate light spots.

[0033] The size information can be the number of pixels contained in the light spot, and the aspect ratio can be the ratio between the longest horizontal axis and the longest vertical axis of the light spot. Both the size information and aspect ratio satisfying the first setting condition can be understood as the size information and aspect ratio of the light spot being within a set range. This set range can be determined by the developers based on the actual information of the light spot.

[0034] Step 130: Determine whether there is a pupil in the sub-region where the candidate light spot is located.

[0035] The sub-region is a region of a predetermined size containing the candidate light spot. The sub-region can be a rectangular region or a rectangular region centered on the candidate light spot. In this embodiment, the process of determining whether a pupil exists in the sub-region containing the candidate light spot can be as follows: whether a pupil can be detected in the sub-region containing the candidate light spot. If a pupil can be detected, it indicates that a pupil exists in the sub-region containing the candidate light spot; otherwise, a pupil does not exist in the sub-region containing the candidate light spot.

[0036] Optionally, before determining whether a pupil exists in the sub-region where the candidate spot is located, the following steps are also included: first performing maximum and minimum value filtering on the sub-region where the candidate spot is located, and then performing median filtering.

[0037] The principle of max-min filtering is as follows: the gray value of each pixel is compared with the minimum and maximum gray values ​​of all pixels within a neighborhood window (e.g., a 3x3 window centered on the pixel). If the gray value is smaller than the minimum, the pixel's gray value is replaced with the minimum; if it is larger than the maximum, the pixel's gray value is replaced with the maximum. Max-min filtering can eliminate the influence of stray light. The principle of median filtering is that the gray value of each pixel is set to the median of the gray values ​​of all pixels within a neighborhood window (e.g., a 3x3 window centered on the pixel). Median filtering can make the edges of the third eye image clearer.

[0038] Specifically, the method for determining whether a pupil exists in the sub-region where the candidate spot is located can be as follows: the pixel with the smallest gray value in the sub-region where the candidate spot is located is determined as the seed point; region growth is performed based on the seed point to obtain the pupil region; if the pupil region meets the second set condition, then whether a pupil exists in the sub-region where the candidate spot is located.

[0039] The seed point can be the starting point for region growth. In this embodiment, region growth based on the seed point can be performed by growing the region according to multiple gray-level steps. The gray-level step can be understood as the step size of gray values, and the multiple gray-level steps can be step size 1 to step size 10. The region growth method can be an eight-way connected component labeling algorithm, which is not limited here.

[0040] The second setting condition can be that the size information, aspect ratio, and fill degree of the pupil region all meet the second setting condition. Size information can be understood as the number of pixels contained in the candidate pupil region. Aspect ratio can be understood as the ratio between the longest horizontal axis and the longest vertical axis in the candidate pupil region. The fill degree can be calculated by determining the number of pixels contained in the candidate pupil region and the area of ​​its circumscribed circle; then dividing the number of pixels by the area of ​​the circumscribed circle to obtain the fill degree. In this embodiment, the candidate pupil region is determined to meet the setting condition if the size information of the candidate pupil region is within a first range, the aspect ratio is within a second range, and the fill degree is within a third range. The first, second, and third ranges are determined based on the actual pupil information.

[0041] In this embodiment, for a region obtained by growing the region at each grayscale step, if there is a region that meets the second set condition, then the region is determined as the pupil region.

[0042] Step 140: The candidate light spot is determined as the target light spot.

[0043] Specifically, if a pupil is detected in a candidate spot, the candidate spot is identified as the target spot.

[0044] Step 150: Determine the detection frames for both eyes based on the pupil information corresponding to the target light spots of both eyes.

[0045] The pupil information includes the average grayscale value of the pupil, the pupil radius, and the distance from the pupil center point. In this embodiment, it is necessary to determine the target light spots for the user's two eyes (left and right eyes) separately. At least one target light spot can be determined for the left eye, and at least one target light spot can be determined for the right eye. A pair of matching target light spots needs to be determined from both eyes, and the detection box for both eyes is determined based on the pair of matching target light spots.

[0046] Specifically, the method for determining the detection frames of both eyes based on the pupil information corresponding to the target light spots of both eyes can be: determining the detection frames of the matching target light spot pairs in both eyes as the detection frames of both eyes; or, determining the detection frames of the pupil center pairs corresponding to the matching target light spot pairs in both eyes as the detection frames of both eyes.

[0047] Among them, the matching target light spot pairs meet the following conditions: the difference in the average gray value of the pupil is less than the second set threshold, the difference in the pupil radius is less than the third set threshold, and the distance between the pupil center points is within the set range.

[0048] Wherein, the average grayscale value of the pupil can be the average grayscale value of the pupil region corresponding to the target light spot, the pupil radius can be the radius of the pupil region corresponding to the target light spot, and the pupil center can be the center point of the pupil region corresponding to the target light spot. The detection box containing the target light spot pair can be a rectangle centered on the two target light spots in each eye, and the detection box containing the pupil center pair can be understood as a rectangle centered on the two pupil centers in each eye. For example, Figure 2 This is an example diagram of the binocular detection frame determined in this embodiment.

[0049] The technical solution of this embodiment extracts light spots from an eye image; filters the light spots to obtain candidate light spots; determines whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a predetermined size containing the candidate light spot; if it exists, the candidate light spot is determined as the target light spot; and the detection box for both eyes is determined based on the pupil information corresponding to the target light spots of both eyes. The eye detection box determination method provided by this embodiment of the invention, which determines the detection box for both eyes based on the pupil information corresponding to the target light spots of both eyes, can reduce the computational load of eye detection box determination and improve the efficiency of eye detection box determination.

[0050] Example 2

[0051] Figure 3 This is a schematic diagram of the structure of an eye detection frame determination device provided in Embodiment 2 of the present invention.

[0052] like Figure 3 As shown, the device includes:

[0053] The light spot extraction module 210 is used to extract light spots in eye images;

[0054] The candidate light spot acquisition module 220 is used to filter light spots and obtain candidate light spots;

[0055] The pupil detection module 230 is used to determine whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a set size that contains the candidate light spot;

[0056] The target spot determination module 240 is used to determine the candidate spot as the target spot if a pupil exists in the sub-region where the candidate spot is located.

[0057] The detection frame determination module 250 is used to determine the detection frames for both eyes based on the pupil information corresponding to the target light spots of both eyes.

[0058] Optionally, the spot extraction module 210 is also used for:

[0059] For each pixel in the eye image, determine the average gray value of the defined region where the pixel is located;

[0060] Calculate the difference between the gray value of a pixel and the average gray value;

[0061] If the difference is greater than the first set threshold, the gray value of the pixel is adjusted to the first set value; otherwise, the gray value of the pixel is adjusted to the second set value.

[0062] The area enclosed by pixels with a grayscale value of the first set value is defined as the light spot.

[0063] Optionally, the candidate spot acquisition module 220 is also used for:

[0064] Spots whose size information and aspect ratio both meet the first set conditions are identified as candidate spots.

[0065] Optionally, the pupil detection module 230 is also used for:

[0066] The pixel with the smallest gray value in the sub-region where the candidate spot is located is determined as the seed point;

[0067] Region growth is performed based on seed points to obtain the pupil region;

[0068] If the pupil region meets the second set condition, then whether there is a pupil in the sub-region where the candidate light spot is located.

[0069] Optionally, the pupil detection module 230 is also used for:

[0070] Multiple pupil regions are obtained by performing region growth based on seed points at multiple grayscale steps.

[0071] If multiple pupil regions exist that satisfy the second set condition, then the sub-region where the candidate light spot is located must be determined whether a pupil exists.

[0072] Optionally, the second setting condition is that the size information, aspect ratio, and fill degree of the pupil area all meet the second setting condition.

[0073] Optionally, pupil information includes the average grayscale value of the pupil, the pupil radius, and the distance from the pupil center point; the detection frame determination module 250 is also used for:

[0074] The detection bounding boxes containing the matched target spot pairs in both eyes are defined as the detection bounding boxes for both eyes; or...

[0075] The detection frame containing the pupil center pair corresponding to the matched target spot pair in both eyes is determined as the detection frame for both eyes; wherein, the matched target spot pair satisfies the following conditions: the difference in the average gray value of the pupil is less than the second set threshold, the difference in the pupil radius is less than the third set threshold, and the distance between the pupil center points is within the set range.

[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 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 4 A block diagram of a computer device 312 suitable for implementing embodiments of the present invention is shown. Figure 4 The computer device 312 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention. Device 312 is a typical computing device for determining the function of an eye detection frame.

[0079] like Figure 4 As shown, the computer device 312 is presented in the form of a general-purpose computing device. The components of the computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 connecting different system components (including the storage device 328 and the processor 316).

[0080] Bus 318 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MCA) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.

[0081] Computer device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 312, including volatile and non-volatile media, removable and non-removable media.

[0082] Storage device 328 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 330 and / or cache memory 332. Computer device 312 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 334 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a Compact Disc-Read Only Memory (CD-ROM), a Digital Video Disc-Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 via one or more data media interfaces. Storage device 328 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0083] A program 336 having a set (at least one) of program modules 326 may be stored in, for example, a storage device 328. Such program modules 326 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 326 typically perform the functions and / or methods described in the embodiments of the present invention.

[0084] Computer device 312 can also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), and with one or more devices that enable a user to interact with the computer device 312, and / or with any device that enables the computer device 312 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 322. Furthermore, computer device 312 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN)) and / or public networks, such as the Internet) via network adapter 320. As shown, network adapter 320 communicates with other modules of computer device 312 via bus 318. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with computer device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) systems, tape drives, and data backup storage systems.

[0085] The processor 316 executes various functional applications and data processing by running programs stored in the storage device 328, such as implementing the eye detection frame determination method provided in the above embodiments of the present invention.

[0086] Example 4

[0087] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processing device, implements the eye detection frame determination method as described in this invention. The computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0088] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0089] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0090] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: extract light spots from an eye image; filter the light spots to obtain candidate light spots; determine whether a pupil exists in a sub-region containing the candidate light spots; wherein the sub-region is a region of a predetermined size containing the candidate light spots; if it exists, determine the candidate light spots as target light spots; and determine the detection frames for both eyes based on the pupil information corresponding to the target light spots of both eyes.

[0091] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0093] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0094] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0095] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0096] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for determining an eye detection frame, characterized in that, include: Extract the light spots from the eye image; The light spots are screened to obtain candidate light spots; Determine whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a predetermined size containing the candidate light spot; If it exists, the candidate spot is determined as the target spot; The detection frames for both eyes are determined based on the pupil information corresponding to the target light spots of both eyes; The extraction of light spots from the eye image includes: For each pixel in the eye image, determine the average gray value of the set area where the pixel is located; Calculate the difference between the gray value of the pixel and the average gray value; If the difference is greater than the first set threshold, the gray value of the pixel is adjusted to the first set value; otherwise, the gray value of the pixel is adjusted to the second set value. The area enclosed by pixels with grayscale values ​​of the first set value is defined as the light spot; The pupil information includes the average grayscale value of the pupil, the pupil radius, and the distance from the pupil center point; the detection frame for both eyes is determined based on the pupil information corresponding to the target light spots of both eyes, including: The detection bounding boxes containing the matched target spot pairs in both eyes are defined as the detection bounding boxes for both eyes; or... The detection frame containing the pupil center pair corresponding to the matched target spot pair in both eyes is determined as the detection frame for both eyes; wherein, the matched target spot pair satisfies the following conditions: the difference in the average gray value of the pupil is less than the second set threshold, the difference in the pupil radius is less than the third set threshold, and the distance between the pupil center points is within the set range.

2. The method according to claim 1, characterized in that, The light spots are screened to obtain candidate light spots, including: Spots whose size information and aspect ratio both meet the first set conditions are identified as candidate spots.

3. The method according to claim 1, characterized in that, Determining whether a pupil exists in the sub-region where the candidate light spot is located includes: The pixel with the smallest gray value in the sub-region where the candidate spot is located is determined as the seed point; Based on the seed points, region growth is performed to obtain the pupil region; If the pupil region meets the second set condition, then whether the candidate light spot sub-region has a pupil.

4. The method according to claim 3, characterized in that, Based on the seed points, region growth is performed to obtain the pupil region, including: Based on the seed points, region growth is performed according to multiple grayscale steps to obtain multiple pupil regions; If the pupil region meets the set conditions, then whether the sub-region where the candidate light spot is located has a pupil includes: If any of the plurality of pupil regions meets the second set condition, then the sub-region where the candidate light spot is located does not contain a pupil.

5. The method according to claim 3 or 4, characterized in that, The second setting condition is that the size information, aspect ratio and fill degree of the pupil area all meet the second setting condition.

6. A device for determining an eye detection frame, characterized in that, include: The light spot extraction module is used to extract light spots from eye images; The candidate light spot acquisition module is used to filter the light spots and obtain candidate light spots; A pupil detection module is used to determine whether a pupil exists in the sub-region where the candidate light spot is located; wherein, the sub-region is a region of a predetermined size containing the candidate light spot; The target spot determination module is used to determine the candidate spot as the target spot if a pupil exists in the sub-region where the candidate spot is located; The detection frame determination module is used to determine the detection frame of both eyes based on the pupil information corresponding to the target light spots of both eyes; The light spot extraction module is further used for: For each pixel in the eye image, determine the average gray value of the defined region where the pixel is located; Calculate the difference between the gray value of a pixel and the average gray value; If the difference is greater than the first set threshold, the gray value of the pixel is adjusted to the first set value; otherwise, the gray value of the pixel is adjusted to the second set value. The area enclosed by pixels with a grayscale value of a first set value is defined as the light spot; The pupil information includes the average grayscale value of the pupil, the pupil radius, and the distance from the pupil center point; the detection frame determination module is further used for: The detection bounding boxes containing the matched target spot pairs in both eyes are defined as the detection bounding boxes for both eyes; or... The detection frame containing the pupil center pair corresponding to the matched target spot pair in both eyes is determined as the detection frame for both eyes; wherein, the matched target spot pair satisfies the following conditions: the difference in the average gray value of the pupil is less than the second set threshold, the difference in the pupil radius is less than the third set threshold, and the distance between the pupil center points is within the set range.

7. A computer device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method for determining an eye detection frame as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processing device, the program implements the method for determining the eye detection frame as described in any one of claims 1-5.