Gaze tracking method, device, equipment and storage medium
By extracting the eye image information and light spot matching relationship, and combining the pupil information to fuse the gaze direction, the problem of insufficient number of light spots and inaccurate matching is solved, and the accuracy and reliability of gaze tracking are improved.
Patent Information
- Application Number
- CN202011182061.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-10-29
AI Technical Summary
In existing line of sight tracking technology, when the number of light spots is insufficient or the matching process is inaccurate, the line of sight direction cannot be accurately determined, resulting in low tracking accuracy and reliability.
By extracting the pupil information and light spot information of the eye image, the matching relationship between each light spot and the infrared light source is determined, the target matching sequence is obtained, and the first and second line of sight directions are determined based on the pupil information, and the fusion is performed to obtain the target line of sight direction.
It improves the accuracy and reliability of line of sight tracking and overcomes the problem of being unable to determine the direction of line of sight due to insufficient number of light spots.
Smart Images

Figure CN114428547B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of eye tracking technology, and in particular to a gaze tracking method, device, equipment and storage medium. Background Art
[0002] Gaze tracking technology, also known as eye tracking technology, is a technology used to calculate the gaze point or gaze direction of human eyes. It can accurately record the eye movements of people when they observe scene information in real time, and has been widely used in medical, aviation, vehicle driving, AR / VR and other fields.
[0003] In the related art, the light spot method is used to achieve line of sight estimation during line of sight tracking. This method relies on the number of light spots. When the number of light spots in a certain gaze direction is insufficient, the line of sight result cannot be obtained. It also relies on the accuracy of light spot matching. If there is a problem in the matching process, the line of sight result may not be obtained. Summary of the invention
[0004] Embodiments of the present invention provide a gaze tracking method, device, equipment and storage medium to achieve tracking of human gaze and improve the accuracy and reliability of gaze tracking.
[0005] In a first aspect, an embodiment of the present invention provides a gaze tracking method, comprising:
[0006] Extract pupil information and light spot information from eye images;
[0007] Determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence;
[0008] Determining a first sight direction according to the target matching sequence and the pupil information;
[0009] determining a second sight line direction according to the pupil information;
[0010] The first sight line direction and the second sight line direction are merged to obtain a target sight line direction.
[0011] In a second aspect, an embodiment of the present invention further provides a gaze tracking device, comprising:
[0012] An information extraction module, used to extract pupil information and light spot information of eye images;
[0013] A target matching sequence acquisition module is used to determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence;
[0014] A first sight line direction determination module, used to determine a first sight line direction according to the target matching sequence and the pupil information;
[0015] A second sight line direction determining module, used to determine a second sight line direction according to the pupil information;
[0016] A target sight line direction acquisition module is used to fuse the first sight line direction and the second sight line direction to obtain a target sight line direction.
[0017] In a third aspect, an embodiment of the present invention further provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the line of sight tracking method as described in the embodiment of the present invention is implemented.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the line of sight tracking method as described in the embodiment of the present invention.
[0019] The embodiments of the present invention provide a line of sight tracking method, device, equipment and storage medium. Extract pupil information and light spot information of an eye image; determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence; determine a first line of sight direction according to the target matching sequence and pupil information; determine a second line of sight direction according to the pupil information; fuse the first line of sight direction and the second line of sight direction to obtain a target line of sight direction. The line of sight tracking method disclosed in the embodiments of the present invention fuses the first line of sight direction determined by the target matching sequence and pupil information with the second line of sight direction determined by the pupil information to obtain the target line of sight direction, which can overcome the problem that the line of sight direction cannot be determined due to an insufficient number of light spots in the gaze orientation, thereby improving the accuracy and reliability of line of sight tracking. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a sight tracking method in Embodiment 1 of the present invention;
[0021] Figure 2 is a structural schematic diagram of a sight tracking device in Embodiment 2 of the present invention;
[0022] Figure 3 It is a structural diagram of a computer device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0024] Embodiment 1
[0025] Figure 1 This is a flow chart of a gaze tracking method provided in the first embodiment of the present invention. This embodiment is applicable to the case of tracking the gaze of a human eye. The method can be performed by a gaze tracking device, which can be composed of hardware and / or software and can generally be integrated in a device with gaze tracking function, which can be an electronic device such as a server or a server cluster. Figure 1 As shown, the specific steps include:
[0026] Step 110: extract pupil information and light spot information of the eye image.
[0027] Among them, the eye image can be taken by an infrared camera set in the gaze tracking device, and the eye image contains the pupil of the human eye and the light spot formed by the infrared light source irradiating the human eye. Pupil information includes the center of the pupil of the image, the length of the major axis of the ellipse, the length of the minor axis of the ellipse and the major axis angle. The ellipse can be understood as an ellipse formed by the pupil outline, and the major axis angle can be the deflection angle of the major axis of the ellipse in the camera coordinate system. The light spot information can be understood as the center position of each light spot.
[0028] In this embodiment, the method for extracting pupil information of an eye image may be: filtering the light spot area in the eye image; performing edge extraction on the filtered eye image to obtain an edge point set; performing ellipse fitting on the edge points, extracting the major and minor axis lengths and the major axis angle of the fitted ellipse, and determining the center of the fitted ellipse as the image pupil center.
[0029] The light spot area in the eye image can be filtered by using a low-value filtering technique or an image erosion technique. The edge of the filtered eye image can be extracted by using an edge detection algorithm such as a Sobel operator, a Laplacian operator or a Canny operator.
[0030] Optionally, after edge extraction is performed on the filtered eye image to obtain an edge point set (hereinafter referred to as the first edge point set), the first edge point set can be filtered according to the pupil detection result of the previous frame of the eye image, and ellipse fitting is performed based on the filtered edge point set.
[0031] Among them, the method of filtering the first edge point set according to the pupil detection result of the previous frame of eye image can be: determining the second edge point set according to the pupil detection result of the previous frame of eye image; and filtering the first edge point set based on the second edge point set.
[0032] Specifically, the process of determining the second edge point set based on the pupil detection result of the previous frame of eye image can be: using the pixel point corresponding to the position information of the pupil center of the previous frame of eye image as the seed point, performing regional growth according to the step value of the previous frame to obtain the pupil area; and determining the edge points of the pupil area as the second edge point set. Alternatively, traverse the pupil edge point set of the previous frame of eye image, obtain the gradient value and grayscale value of the traversed pupil edge point, and if the gradient value and grayscale value both meet the set conditions, determine the traversed edge point as the second edge point. The set condition can be that the deviation between the gradient value of the traversed edge point and the maximum gradient value of the pixel points around the edge point is less than the first threshold, and the deviation between the grayscale value of the traversed edge point and the maximum grayscale value of the pixel points around the edge point is less than the second threshold.
[0033] Specifically, the method of screening the first edge point set based on the second edge point set may be: traversing the first edge point set, determining whether there is a point in the second edge point set that meets the set condition; if so, retaining the traversed first edge point; or determining the midpoint between the traversed first edge point and the second edge point that meets the set condition as the target edge point. The set condition is that the distance from the traversed first edge point is less than a third set value.
[0034] Step 120: determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence.
[0035] The matching relationship can be understood as the corresponding relationship between the light spot and the infrared light source, that is, determining which infrared light source the light spot is generated by. In the matching sequence, the light spot and the infrared light source correspond one to one.
[0036] In this embodiment, the method for determining the matching relationship between each light spot and the infrared light source can be: determining the light source coordinates of each light source and the light spot coordinates of each light spot; establishing a matching relationship between each light spot and a different light source, respectively, to obtain multiple groups of matching sequences; determining the matching score of each group of matching sequences according to the light source coordinates and the light spot coordinates; and determining the matching sequence with the highest matching score as the target matching sequence.
[0037] Specifically, when determining the matching score of each set of matching sequences, the structural parameters and camera parameters of the device should also be considered.
[0038] Specifically, the process of determining the matching score corresponding to each group of matching sequences based on the coordinates of each light source and the coordinates of each light spot can be: for each group of matching sequences, determining at least one matching parameter corresponding to the matching sequence based on the coordinates of each light source and the coordinates of each light spot; determining the matching sequences whose matching parameters all fall within the preset parameter range as candidate matching sequences; for each group of candidate matching sequences, performing score evaluation on each matching parameter based on the preset parameter range to obtain a parameter score for each matching parameter; and weightedly summing each parameter score based on a preset weighting coefficient to obtain a matching score corresponding to the candidate matching sequence.
[0039] Among them, the matching parameters include the maximum angle of the light source spot matching vector, the ratio of the side lengths of the light source and the spot, the internal angle error of the polygon, the ratio of the distance between the straight line intersection and the light source spot, the straight line intersection error, the angle between the straight line intersection and the line connecting the light spot light source, the fitting circle radius, the fitting circle radius error, the angle between the pupil coordinates and the line connecting the straight line intersection reference point and / or the straight line intersection coordinates.
[0040] Step 130: determine a first sight line direction according to the target matching sequence and pupil information.
[0041] The sight direction can be represented by the coordinates of the gaze point, which is the intersection of the sight line and the gaze plane.
[0042] In this embodiment, the process of determining the first line of sight direction according to the target matching sequence may be: verifying the matching relationship between each light spot and each infrared light source in the target matching sequence, obtaining a matching relationship that satisfies the confidence condition, and determining it as the target matching relationship; determining the center of corneal curvature according to the target matching relationship; determining the actual pupil center according to the center of corneal curvature and the image pupil center; determining the optical axis direction according to the center of corneal curvature and the actual pupil center; and determining the first line of sight direction according to the optical axis direction and the first calibration coefficient.
[0043] The matching relationship between each light spot and each infrared light source in the target matching sequence can be verified according to the known position information of the infrared light source and the camera. The image pupil center can be understood as the pupil center in the eye image, and the actual pupil center can be understood as the pupil center of the actual eyeball.
[0044] Specifically, the method of determining the center of corneal curvature according to the target matching relationship can be: establish a polynomial based on the principle of light reflection, and then determine the center of corneal curvature based on the polynomial. Among them, the principle of light reflection is: the incident light, the reflected light and the normal at the reflection point are in the same plane; the incident angle and the reflection angle are equal. The process of determining the center of corneal curvature according to the principle of light reflection can be: assuming that the coordinates of the infrared light source in one set of target matching relationships are L1, the center of the light spot is U1, the reflection point is Q1, the position coordinates of the infrared camera are O, and the center of corneal curvature to be determined is C, then the direction vector OQ1 is obtained according to U1, O and the camera's own fc / cc data, and Q1-O=k1(O-U1) is satisfied. An initial value is assigned to k1, and the coordinates Q1 of the reflection point can be calculated. Then, according to the principle of light reflection, we can establish polynomials: (L1-O)×(Q1-O)·(CO)=0; (L1-Q)·(Q1-C)||O-Q1||=(O-Q1)·(Q1-C)||L1-Q1||. And the expression of the eyeball radius can be expressed as R=||Q1-C||. The letters in the above formulas represent the three-dimensional coordinates of the point. By combining the above formulas, since L1, O, Q1 and R are all known quantities, the coordinates of the center of corneal curvature C can be obtained.
[0045] For another set of target matching relationships, the coordinates of the infrared light source are L2, the center of the spot is U2, and the reflection point is Q2. The direction vector of OQ2 is obtained based on U2, O, and the camera's own fc / cc data. Based on the above-obtained center of corneal curvature C, the coordinates of the reflection point Q2 can be obtained, and the incident light L2Q2, the reflected light Q2O, and the normal CQ2 at the reflection point can be obtained. Then, the reflection principle is verified based on the incident light L2Q2, the reflected light Q2O, and the normal CQ2 at the reflection point. Since C obtained based on the initial value k1 may not necessarily make L2-U2 satisfy the reflection principle, k1 needs to be continuously adjusted until the reflection solution of L2--U2 is optimal. When the reflection solution of L2--U2 is optimal, the obtained C is the final center of corneal curvature.
[0046] Similarly, when there are multiple target matching relationships, the K1 assumed by one of the light source spot matching relationships is used to make the target matching relationships of the remaining groups satisfy the light reflection principle as much as possible. In addition, during the optimization process, if there is always a large deviation between the solutions of the reflection formula of one group and the remaining groups, it can be determined that the matching relationship of this group is wrong.
[0047] Specifically, the method of determining the actual pupil center according to the corneal curvature center and the image pupil center can be: establish a polynomial according to the optical refraction principle, and determine the actual pupil center based on the established polynomial. Wherein, the refraction principle is: the incident light, the refracted light and the normal at the refraction point are in the same plane; the incident angle and the refraction angle satisfy n1sinθ1=n2sinθ2, where n1 is the air refractive index, θ1 is the incident angle, n2 is the eyeball refractive index, and θ2 is the refraction angle. Assuming that the refraction point is r, the image pupil center is V, and the actual pupil center is P, the polynomials established according to these principles are: (rO)×(CO)·(PO)=0; n1·||(rC)×(Pr)||·||Or|=n2·||(rC×(Or))||·||Pr||; r=O+k2(OV); ||rC||=R. The letters in the above formulas represent the three-dimensional coordinates of the point respectively. Combine the above equations, where V, O, R, n1 and n2 are known quantities. First, operate the above equations to make P represented by known quantities, and then calculate k2. The coordinates of the refraction point r can be obtained based on the calculated k2, and then the coordinates of the actual pupil center P can be calculated based on the positional relationship between the three points C, r and P.
[0048] The method of determining the direction of the optical axis based on the center of corneal curvature and the actual pupil center is: connecting the center of corneal curvature and the actual pupil center is the direction of the optical axis.
[0049] The first calibration coefficient includes a first lateral offset angle and a first longitudinal offset angle. The process of obtaining the first calibration coefficient may be: displaying corresponding points on the screen to guide the user to watch, obtaining the actual sight direction of the user, collecting the user's eye image, analyzing the eye image based on the above method, obtaining the optical axis direction, calculating the deviation between the optical axis direction and the actual sight direction, and obtaining the first calibration coefficient.
[0050] Specifically, the direction of the optical axis is adjusted according to the first transverse offset angle and the first longitudinal offset angle to obtain the first sight direction.
[0051] Step 140: determine a second sight line direction according to the pupil information.
[0052] The pupil information includes the lengths of the major and minor axes of the ellipse and the major axis angle.
[0053] Specifically, the method of determining the second line of sight direction according to pupil information can be: obtaining the camera position information for capturing the eye image; determining the actual pupil direction based on the imaging principle according to the camera position information and the pupil information; and determining the second line of sight direction according to the actual pupil direction and the second calibration coefficient.
[0054] The actual pupil direction can be understood as the direction corresponding to the normal vector of the plane where the pupil of the human eye is located. The camera position information can be understood as the coordinates of the infrared camera shooting point. In this embodiment, based on the imaging principle, the plane where the actual pupil is located can be determined according to the length of the major and minor axes of the ellipse, the major axis angle and the camera position information, and the actual pupil direction can be determined according to the plane where the actual pupil is located.
[0055] The second calibration coefficient includes a second lateral offset angle and a second longitudinal offset angle. The process of obtaining the second calibration coefficient may be: displaying corresponding points on the screen to guide the user to watch, obtaining the actual sight direction of the user, collecting the user's eye image, analyzing the eye image based on the above method, obtaining the actual pupil direction, calculating the deviation between the actual pupil direction and the actual sight direction, and obtaining the second calibration coefficient.
[0056] Specifically, the actual pupil direction is adjusted according to the second lateral offset angle and the second longitudinal offset angle to obtain the second sight line direction.
[0057] Step 150: merge the first sight line direction and the second sight line direction to obtain a target sight line direction.
[0058] The first sight line direction includes a first left eye sight line direction and a first right eye sight line direction; the second sight line direction includes a second left eye sight line direction and a second right eye sight line direction.
[0059] Specifically, the first sight direction and the second sight direction are merged to obtain the target sight direction by: obtaining a first weight corresponding to the first sight direction based on a first preset weight table; obtaining a second weight corresponding to the second sight direction based on a second preset weight table; and performing weighted summation of the first sight direction and the second sight direction according to the first weight and the second weight to obtain the target sight direction.
[0060] Among them, the weight table records the correspondence between the gaze area and the weight. The first preset weight table includes a first left eye preset weight table and a first right eye preset weight table; the second preset weight table includes a second left eye preset weight table and a second right eye preset weight table. The first weight includes a first left eye weight and a first right eye weight; the second weight includes a second left eye weight and a second right eye weight. In this embodiment, due to the different positions of the infrared light source and the left and right eye positions, when the user looks at different areas, the number of light spots formed in the user's eyes is different. Therefore, it is necessary to establish a weight table in advance based on the structural parameters and camera parameters.
[0061] Optionally, the following step is also included: performing exclusion verification on the first left eye sight direction, the first right eye sight direction, the second left eye sight direction and the second right eye sight direction, and deleting sight directions that do not meet the conditions.
[0062] Among them, the sight direction is characterized by the coordinates of the gaze point, so it is necessary to perform exclusion verification on the coordinates of the four gaze points. When verifying the exclusion, the weight information of each sight direction in the weight table can be referred to. If the area where the gaze point is located shows that the data falling into the area is unavailable in the weight table, the sight direction corresponding to the gaze point needs to be deleted. Exemplarily, it is assumed that the first left eye sight direction and the first right eye sight direction are close to position a, and the second left eye sight direction and the second right eye sight are close to position b. In the first left eye weight table, the confidence corresponding to position a is lower than the set value, indicating that the first left eye sight direction at this time does not meet the conditions and should be deleted. In the first right eye weight table, the confidence corresponding to position a is higher than the set value. In the second left eye weight table and the second right eye weight table, the confidence corresponding to position b is greater than the set value. Since the position close to the first right eye sight direction is different from the position close to the second left eye sight direction and the second right eye sight direction, that is, there is a difference in the first right eye sight direction, therefore, the first right eye sight direction also needs to be excluded. Therefore, in this exclusion verification, the first left eye sight direction and the first right eye sight direction are deleted, and the second left eye sight direction and the second right eye sight direction are retained.
[0063] Specifically, after deleting the sight lines that do not meet the conditions, weighted sum is performed on the retained sight lines to obtain the target sight line direction.
[0064] The technical solution of this embodiment extracts pupil information and light spot information of the eye image; determines the matching relationship between each light spot and each infrared light source to obtain a target matching sequence; determines a first sight line direction according to the target matching sequence and pupil information; determines a second sight line direction according to the pupil information; and fuses the first sight line direction and the second sight line direction to obtain a target sight line direction. The sight line tracking method disclosed in the embodiment of the present invention fuses the first sight line direction determined by the target matching sequence and pupil information with the second sight line direction determined by the pupil information to obtain the target sight line direction, which can overcome the problem that the sight line direction cannot be determined due to an insufficient number of light spots in the gaze orientation, and improves the accuracy and reliability of sight line tracking.
[0065] Embodiment 2
[0066] Figure 2 Schematic diagram of the structure of a sight tracking device provided by Embodiment 2 of the present invention. Figure 2 As shown, the device comprises:
[0067] An information extraction module 210, used to extract pupil information and light spot information of an eye image;
[0068] The target matching sequence acquisition module 220 is used to determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence;
[0069] A first sight line direction determining module 230, configured to determine a first sight line direction according to a target matching sequence and pupil information;
[0070] A second sight line direction determining module 240, configured to determine a second sight line direction according to pupil information;
[0071] The target sight line direction acquisition module 250 is used to merge the first sight line direction and the second sight line direction to obtain the target sight line direction.
[0072] Optionally, the target matching sequence acquisition module 220 is further used to:
[0073] Determine the light source coordinates of each light source and the light spot coordinates of each light spot;
[0074] Establish matching relationships between each light spot and different light sources, and obtain multiple sets of matching sequences; in each set of matching sequences, the light spots and light sources correspond one to one;
[0075] Determine the matching score of each group of matching sequences according to the coordinates of each light source and each light spot;
[0076] The matching sequence with the highest matching score is determined as the target matching sequence.
[0077] Optionally, the first sight direction determining module 230 is further configured to:
[0078] Verify the matching relationship between each light spot and each infrared light source in the target matching sequence, obtain the matching relationship that meets the confidence condition, and determine it as the target matching relationship;
[0079] Determine the center of corneal curvature according to the target matching relationship;
[0080] Determine the actual pupil center based on the corneal curvature center and the image pupil center;
[0081] Determine the direction of the optical axis based on the center of corneal curvature and the actual pupil center;
[0082] A first sight line direction is determined according to the optical axis direction and a first calibration coefficient.
[0083] Optionally, the first calibration coefficient includes a first lateral offset angle and a first longitudinal offset angle; the first sight direction determining module 230 is further used to:
[0084] The optical axis direction is adjusted according to the first transverse offset angle and the first longitudinal offset angle to obtain a first sight direction.
[0085] Optionally, the pupil information includes the pupil center of the image, the lengths of the major and minor axes of the ellipse, and the major axis angle; the information extraction module 210 is further used for:
[0086] Filter the light spot area in the eye image;
[0087] Perform edge extraction on the filtered eye image to obtain an edge point set;
[0088] Ellipse fitting is performed on the edge points, the lengths of the major and minor axes and the major axis angle of the fitted ellipse are extracted, and the center of the fitted ellipse is determined as the center of the image pupil; among which, the major axis angle is the deflection angle of the major axis of the ellipse in the camera coordinate system.
[0089] Optionally, the second sight line direction determining module 240 is further configured to:
[0090] Obtaining the position information of the camera used to capture the eye image;
[0091] Determine the actual pupil orientation based on the imaging principle according to the camera position information and the pupil information;
[0092] A second sight line direction is determined according to the actual pupil orientation and the second calibration coefficient.
[0093] Optionally, the second calibration coefficient includes a second lateral offset angle and a second longitudinal offset angle; the second sight line direction determination module 240 is further used to:
[0094] The actual pupil direction is adjusted according to the second lateral offset angle and the second longitudinal offset angle to obtain a second sight line direction.
[0095] Optionally, the target sight line direction acquisition module 250 is further used for:
[0096] Acquire a first weight corresponding to the first sight direction based on a first preset weight table;
[0097] Obtaining a second weight corresponding to the second sight line direction based on a second preset weight table;
[0098] The first sight line direction and the second sight line direction are weightedly summed according to the first weight and the second weight to obtain the target sight line direction; the weight table records the corresponding relationship between the gaze area and the weight.
[0099] Optionally, the first sight line direction includes a first left eye sight line direction and a first right eye sight line direction; the second sight line direction includes a second left eye sight line direction and a second right eye sight line direction; and further includes: a sight line direction verification module, which is used to:
[0100] The first left eye sight direction, the first right eye sight direction, the second left eye sight direction and the second right eye sight direction are subjected to exclusion verification, and sight directions that do not meet the conditions are deleted.
[0101] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0102] Embodiment 3
[0103] Figure 3 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 3 A block diagram of a computer device 312 suitable for use in implementing embodiments of the present invention is shown. Figure 3 The computer device 312 shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention. The device 312 is a typical computing device with gaze tracking function.
[0104] like Figure 3 As shown, the computer device 312 is 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).
[0105] Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0106] The computer device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 312, including volatile and non-volatile media, removable and non-removable media.
[0107] The 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. The computer device 312 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 334 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 318 via one or more data medium interfaces. The storage device 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0108] A program 336 having a set (at least one) of program modules 326 may be stored, for example, in a storage device 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 326 generally perform the functions and / or methods of the embodiments described herein.
[0109] The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), may also communicate with one or more devices that enable a user to interact with the computer device 312, and / or communicate with any device that enables the computer device 312 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 322. In addition, the computer device 312 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 320. As shown, the network adapter 320 communicates with other modules of the computer device 312 through a bus 318. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0110] The processor 316 executes various functional applications and data processing by running the programs stored in the storage device 328, such as implementing the gaze tracking method provided in the above-mentioned embodiment of the present invention.
[0111] Embodiment 4
[0112] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processing device, a method for mapping a gaze point in an embodiment of the present invention is implemented. The computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0113] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0114] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0115] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: extracts pupil information and light spot information of the eye image; determines the matching relationship between each light spot and each infrared light source to obtain a target matching sequence; determines a first sight line direction according to the target matching sequence and the pupil information; determines a second sight line direction according to the pupil information; and merges the first sight line direction and the second sight line direction to obtain a target sight line direction.
[0116] Computer program code for performing the operations of the present disclosure may 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, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0117] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0119] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0120] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A gaze tracking method, characterized in that: include: Extract pupil information and light spot information from eye images; Determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence; Determining a first sight direction according to the target matching sequence and the pupil information; determining a second sight line direction according to the pupil information; Merging the first sight line direction and the second sight line direction to obtain a target sight line direction; The step of fusing the first sight line direction and the second sight line direction to obtain a target sight line direction includes: Acquire a first weight corresponding to the first sight direction based on a first preset weight table; Acquire a second weight corresponding to the second sight line direction based on a second preset weight table; The first sight line direction and the second sight line direction are weightedly summed according to the first weight and the second weight to obtain a target sight line direction; the weight table records the corresponding relationship between the gaze area and the weight.
2. The method according to claim 1, characterized in that Determine the matching relationship between each light spot and the infrared light source, including: Determine the light source coordinates of each light source and the light spot coordinates of each light spot; Establishing matching relationships between the light spots and different light sources, respectively, to obtain multiple sets of matching sequences; in each set of matching sequences, the light spots and light sources correspond one to one; Determine a matching score for each group of matching sequences according to the light source coordinates and the light spot coordinates; The matching sequence with the highest matching score is determined as the target matching sequence.
3. The method according to claim 1 or 2, characterized in that: Determining a first sight direction according to the target matching sequence includes: Verifying the matching relationship between each light spot and each infrared light source in the target matching sequence, obtaining a matching relationship whose confidence meets the condition, and determining it as the target matching relationship; Determining the center of corneal curvature according to the target matching relationship; Determining an actual pupil center according to the corneal curvature center and the image pupil center; Determine the direction of the optical axis according to the corneal curvature center and the actual pupil center; A first sight line direction is determined according to the optical axis direction and a first calibration coefficient.
4. The method according to claim 3, characterized in that The first calibration coefficient includes a first lateral offset angle and a first longitudinal offset angle; and determining a first line of sight direction according to the optical axis direction and the first calibration coefficient includes: The optical axis direction is adjusted according to the first transverse offset angle and the first longitudinal offset angle to obtain a first sight line direction.
5. The method according to claim 1, characterized in that The pupil information includes the pupil center of the image, the length of the major and minor axes of the ellipse, and the major axis angle; Extract pupil information from eye images, including: filtering the light spot area in the eye image; Perform edge extraction on the filtered eye image to obtain an edge point set; Ellipse fitting is performed on the edge points, the lengths of the major and minor axes and the major axis angle of the fitted ellipse are extracted, and the center of the fitted ellipse is determined as the center of the image pupil; wherein the major axis angle is the deflection angle of the major axis of the ellipse in the camera coordinate system.
6. The method according to claim 1 or 5, characterized in that: Determining a second sight line direction according to the pupil information includes: Obtaining position information of a camera used to capture the eye image; Determine the actual pupil orientation based on the imaging principle according to the camera position information and the pupil information; A second sight line direction is determined according to the actual pupil orientation and a second calibration coefficient.
7. The method according to claim 6, characterized in that The second calibration coefficient includes a second lateral offset angle and a second longitudinal offset angle; and determining a second sight line direction according to the actual pupil orientation and the second calibration coefficient includes: The actual pupil direction is adjusted according to the two lateral offset angles and the second longitudinal offset angle to obtain a second sight line direction.
8. The method according to claim 1, characterized in that The first sight line direction includes a first left eye sight line direction and a first right eye sight line direction; the second sight line direction includes a second left eye sight line direction and a second right eye sight line direction; and further includes: According to the weight table, the first left eye sight line direction, the first right eye sight line direction, the second left eye sight line direction and the second right eye sight line direction are subjected to exclusion verification, and sight lines directions that do not meet the conditions are deleted.
9. A gaze tracking device, characterized in that: include: An information extraction module, used to extract pupil information and light spot information of eye images; A target matching sequence acquisition module is used to determine the matching relationship between each light spot and each infrared light source to obtain a target matching sequence; A first sight line direction determination module, used to determine a first sight line direction according to the target matching sequence and the pupil information; A second sight line direction determining module, used to determine a second sight line direction according to the pupil information; a target sight line direction acquisition module, configured to fuse the first sight line direction and the second sight line direction to obtain a target sight line direction; Wherein, the target sight direction acquisition module is also used for: Acquire a first weight corresponding to the first sight direction based on a first preset weight table; Obtaining a second weight corresponding to the second sight line direction based on a second preset weight table; The first sight line direction and the second sight line direction are weightedly summed according to the first weight and the second weight to obtain the target sight line direction; the weight table records the corresponding relationship between the gaze area and the weight.
10. A computer device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the line of sight tracking method according to any one of claims 1 to 8 when executing the program.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the line of sight tracking method described in any one of claims 1 to 8 is implemented.
