A method and apparatus for locating the center of the pupil

By using pupil region localization, edge detection, and region fitting, noise interference in mid-to-long-distance pupil center localization is reduced, improving the accuracy of pupil center localization and gaze tracking.

CN115423870BActive Publication Date: 2026-06-23CHINA AUTOMOTIVE INNOVATION CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA AUTOMOTIVE INNOVATION CORP
Filing Date
2022-08-29
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In mid- to long-distance shooting, factors such as eyelids, eyelashes, light spots, and glasses in the eye area can cause errors in pupil center positioning, affecting the accuracy of eye tracking.

Method used

By performing pupil region localization, edge detection, binarization, edge point filtering, and region fitting on the target image, noise interference is reduced and the accuracy of pupil center localization is improved.

Benefits of technology

It reduces noise interference in mid-to-long-distance pupil center positioning, and improves pupil center positioning accuracy and gaze tracking precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423870B_ABST
    Figure CN115423870B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field, in particular to a pupil center positioning method and device; the pupil center positioning method comprises the following steps: pupil region positioning is performed on a target image to obtain a pupil region image; edge detection is performed on the pupil region image to obtain a first pupil edge image; binary processing is performed on the pupil region image based on the gray value of a pixel point in the pupil region image to obtain a binary pupil image; edge point filtering is performed on edge points at corresponding positions in the first pupil edge image based on the gray value of each pixel point in the binary pupil image to obtain a second pupil edge image; region fitting is performed based on the edge points in the second pupil edge image, and a pupil center point is determined based on a region fitting result; the pupil center positioning method provided by the application reduces the influence of noise on pupil center positioning at a medium or long distance, and improves pupil center positioning precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for locating the center of the pupil. Background Technology

[0002] Eye-tracking technology has applications in human-computer interaction, medicine, psychology, interface design and evaluation, military and other technical fields. The key technologies in eye-tracking technology are the positioning of the pupil center and the corneal reflection center. However, in mid- to long-distance shooting, the eye area may be affected by factors such as eyelids, eyelashes, light spots and glasses, which often lead to positioning errors. Summary of the Invention

[0003] To address the aforementioned problems in the prior art, the purpose of this application is to reduce the impact of noise on pupil center localization at medium and long distances, thereby improving pupil center localization accuracy and gaze tracking precision.

[0004] To address the aforementioned problems, this application provides a method for pupil center localization, comprising:

[0005] Pupil region localization is performed on the target image to obtain a pupil region image;

[0006] Edge detection is performed on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image; the first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points;

[0007] Based on the gray values ​​of the pixels in the pupil region image, the pupil region image is binarized to obtain the binarized pupil image corresponding to the pupil region image.

[0008] Based on the grayscale values ​​of each pixel in the binarized pupil image, edge point filtering is performed on the edge points at corresponding positions in the first pupil edge image to obtain the second pupil edge image.

[0009] Region fitting is performed based on the edge points in the second pupil edge image, and the pupil center point is determined based on the region fitting results.

[0010] In this embodiment of the application, the step of binarizing the pupil region image based on the grayscale values ​​of the pixels in the pupil region image to obtain a binarized pupil image corresponding to the pupil region image includes:

[0011] Select a target pixel in the pupil region image; the grayscale value of the target pixel is less than or equal to a preset grayscale value.

[0012] Determine multiple grayscale values ​​corresponding to the target pixel;

[0013] Count the number of target pixels corresponding to the multiple grayscale values;

[0014] A reference grayscale threshold is determined; the number of target pixels corresponding to the reference grayscale threshold is greater than the number of target pixels corresponding to each of the plurality of grayscale values ​​other than the reference grayscale threshold.

[0015] Based on the reference grayscale threshold and the grayscale value of each pixel in the pupil region image, a binarization segmentation threshold is determined.

[0016] The target segmentation threshold is obtained by weighting the reference grayscale threshold and the binarized segmentation threshold.

[0017] The pupil region image is binarized based on the target segmentation threshold to obtain the binarized pupil image.

[0018] In this embodiment of the application, the step of filtering edge points at corresponding positions in the first pupil edge image based on the grayscale values ​​of each pixel in the binarized pupil image to obtain the second pupil edge image includes:

[0019] The grayscale values ​​of the edge points in the first edge image are compared with the corresponding pixels in the binarized pupil image to obtain the comparison results of each edge point.

[0020] If the comparison result of the edge points indicates that the gray value of the edge point is inconsistent with that of the pixel point at the corresponding position, the edge point in the first pupil edge image is deleted.

[0021] In this embodiment of the application, the step of locating the pupil region of the target image to obtain a pupil region image includes:

[0022] Feature extraction is performed on the target image to determine the center point of the eye in the target image;

[0023] The eye localization image is obtained by expanding the area around the center point of the eye.

[0024] Gaussian filtering is applied to the eye localization image to obtain the pupil region image.

[0025] In this embodiment of the application, the step of performing edge detection on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image includes:

[0026] Gradient processing is performed on the pupil region image to obtain a first pupil gradient image;

[0027] The first pupil gradient image is subjected to gradient filtering based on a preset gradient range to obtain the second pupil gradient image;

[0028] Morphological filtering is performed on the edge points in the second pupil gradient image to obtain a morphologically filtered image;

[0029] Discrete edge point filtering is performed on the edge points in the morphologically filtered image to obtain the first pupil edge image.

[0030] In this embodiment of the application, the step of performing region fitting based on edge points in the second pupil edge image and determining the pupil center point based on the region fitting result includes:

[0031] By fitting line segments to adjacent edge points on the second pupil edge image, multiple fitted line segments are obtained;

[0032] Based on the centroids of the multiple fitted line segments and the edge points on their respective fitted line segments, straight line filtering is performed to determine the edge image of the third pupil.

[0033] The center of the pupil is determined by ellipse fitting based on the edge points in the third pupil edge image.

[0034] In this embodiment of the application, determining the pupil center by performing ellipse fitting based on the edge points in the third pupil edge image includes:

[0035] Curve filtering is performed based on the edge points in the third pupil edge image to obtain a fitted curve;

[0036] Based on the fitted curve, an ellipse is fitted to obtain the fitted ellipse;

[0037] If the fitted ellipse satisfies the preset ellipse radius ratio, preset ellipse area, and preset ellipse grayscale threshold, the fitted ellipse is determined to be the target ellipse;

[0038] The center of the pupil is determined based on the target ellipse.

[0039] In this embodiment of the application, determining the pupil center based on the target ellipse includes:

[0040] Based on a preset scaling range, the target ellipse is scaled proportionally to obtain multiple scaled ellipses;

[0041] Ellipse adjustments are performed based on the plurality of scaled ellipses and the target ellipse respectively to obtain the adjustment ellipse corresponding to each of the plurality of scaled ellipses;

[0042] Calculate the ellipse corresponding to each of the multiple adjustment ellipses based on the gray values ​​of the pixels in the pupil region image;

[0043] The pupil center ellipse is determined based on the ellipse corresponding to each of the multiple adjustment ellipses.

[0044] The center of the pupil center ellipse is determined as the pupil center.

[0045] In this embodiment of the application, after locating the pupil region of the target image to obtain a pupil region image, the method further includes:

[0046] Calculate the average gray value of the pixels in the pupil region image;

[0047] Based on the average gray value and the gray value of each pixel in the pupil region image, the reflection pixel threshold is determined.

[0048] The pupil region image is binarized based on the reflection pixel threshold to obtain a binarized reflection image;

[0049] Determine the image centroid of the binarized reflectance image;

[0050] By expanding the region with the centroid of the image as the center point, a corneal reflection image is obtained;

[0051] The corneal reflection center is obtained by performing Gaussian center fitting based on the corneal reflection image.

[0052] On the other hand, embodiments of this application also provide a pupil center positioning device, the device comprising:

[0053] The pupil region localization module is used to locate the pupil region in the target image and obtain a pupil region image;

[0054] An edge detection module is used to perform edge detection on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image; the first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points;

[0055] The binarization processing module is used to perform binarization processing on the pupil region image based on the gray values ​​of the pixels in the pupil region image to obtain the binarized pupil image corresponding to the pupil region image.

[0056] The image fusion module is used to perform edge point filtering on the edge points at corresponding positions in the first pupil edge image based on the gray value of each pixel in the binarized pupil image to obtain the second pupil edge image.

[0057] The pupil center localization module is used to perform region fitting based on the edge points in the second pupil edge image, and determine the pupil center point based on the region fitting result.

[0058] On the other hand, this application also provides an electronic device, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the pupil center localization method as described above.

[0059] On the other hand, this application also provides a computer storage medium storing at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the pupil center localization method described above.

[0060] Due to the above technical solution, the pupil center localization method described in this application has the following beneficial effects:

[0061] By locating the pupil region in the target image, the pupil center in mid-to-long-distance images is identified and located at the pupil position, reducing interference from non-pupil regions in the target image and reducing subsequent data processing volume. This improves the accuracy and speed of pupil center localization, as well as the accuracy and timeliness of gaze tracking. Furthermore, by filtering edge points in the corresponding positions of the first pupil edge image based on the gray values ​​of each pixel in the binarized pupil image, the interference of factors such as light spots on pupil localization is reduced, thereby improving the accuracy of region fitting results and ultimately enhancing the localization accuracy of the pupil center point. Attached Figure Description

[0062] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0063] Figure 1 This is a schematic flowchart of a pupil center localization method provided in an embodiment of this application;

[0064] Figure 2 This is a schematic diagram of the process of obtaining a binarized pupil image in a pupil center localization method provided in an embodiment of this application;

[0065] Figure 3 This is a schematic diagram of the edge point filtering process in a pupil center localization method provided in an embodiment of this application;

[0066] Figure 4 This is a schematic diagram of the process of obtaining a binarized pupil image in a pupil center localization method provided in an embodiment of this application;

[0067] Figure 5This is a schematic diagram of the key point positioning location in a pupil center positioning method provided in an embodiment of this application;

[0068] Figure 6 This is a schematic diagram of the edge detection process in a pupil center localization method provided in an embodiment of this application;

[0069] Figure 7 This is a schematic diagram of a morphological filter template in a pupil center localization method provided in an embodiment of this application;

[0070] Figure 8 This is a schematic diagram of the pupil center positioning process in a pupil center positioning method provided in an embodiment of this application;

[0071] Figure 9 This is a schematic diagram of the ellipse fitting process in a pupil center localization method provided in an embodiment of this application;

[0072] Figure 10 This is a schematic diagram of the corneal reflex center positioning process in a pupil center positioning method provided in this application embodiment;

[0073] Figure 11 This is a schematic diagram of the process for determining the reflective pixel threshold in a pupil center localization method provided in an embodiment of this application;

[0074] Figure 12 This is an actual test image of the positioning result in a pupil center positioning method provided in the embodiments of this application;

[0075] Figure 13 This is a schematic diagram of the structure of a pupil center positioning device provided in an embodiment of this application;

[0076] Figure 14 This is a hardware structure block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0078] The term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of this application. In the description of this application, it should be understood that the terms "upper," "lower," "left," "right," "top," "bottom," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein.

[0079] Combination Figure 1 This application introduces a pupil center localization method provided by an embodiment, the method comprising:

[0080] S1. Locate the pupil region of the target image to obtain a pupil region image; the target image can be a mid-to-long-range image acquired by the image acquisition device during the application process, wherein the image acquisition device can be a vehicle-mounted forward-looking camera or an examination room monitoring camera; pupil region positioning refers to locating the target image to the pupil region; the pupil region image can be an image of the area where the pupil is located, or it can be an image of the area including the eye and the area around the eye.

[0081] In specific application scenarios, the image acquisition device is an in-vehicle forward-facing camera, with medium to long distance referring to the width of the driver's cabin. The forward-facing camera acquires target images and locates the center of the user's pupil, thereby tracking the user's gaze and enabling the vehicle to adopt different response strategies in different driving scenarios. For example, if the user's pupil center is not detected for a period of time and the vehicle is in motion, the autonomous driving mode is activated and the vehicle stops at the relevant location. Another example is that if the user's pupil center is detected and the tracked user's gaze is inconsistent with the vehicle's forward gaze, a warning is issued.

[0082] In another embodiment of this application, the target image may be an image input by the user during the testing process.

[0083] S2. Perform edge detection on the pupil region image to obtain the first pupil edge image corresponding to the pupil region image; the first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points; edge detection refers to the measurement, detection and localization of grayscale changes; an image region edge refers to a set of pixels whose grayscale changes have transitions; an edge point is any pixel point in the image region edge, and the grayscale value of the edge point is 255.

[0084] S3. Based on the grayscale values ​​of pixels in the pupil region image, binarize the pupil region image to obtain a binarized pupil image. The grayscale value of the pixels ranges from 0 to 255, where a grayscale value of 255 is white and a grayscale value of 0 is black. Binarization means transforming the pupil region image into a black and white image based on the target segmentation threshold, with the color near the center of the pupil being white. That is, pixels in the pupil region image with a grayscale value greater than the target segmentation threshold become 0, and pixels with a grayscale value less than or equal to the target segmentation threshold become 255, thus obtaining a binarized pupil image.

[0085] S4. Based on the gray values ​​of each pixel in the binarized pupil image, edge point filtering is performed on the edge points at the corresponding positions in the first pupil edge image to obtain the second pupil edge image. Edge point filtering refers to deleting edge points that do not meet the requirements of the corresponding positions in the first pupil edge image. This can be done by changing the gray value of the edge point at the corresponding position to 0 or by deleting the coordinates of the point to avoid subsequent calculations.

[0086] S5. Perform region fitting based on the edge points in the second pupil edge image, and determine the pupil center point based on the region fitting result; region fitting refers to fitting the closest shape based on the arrangement of edge points, and the shape includes ellipse, circle, rectangle and rhombus.

[0087] In this embodiment, by performing pupil region localization on the target image, the pupil center of the mid-to-long-distance image is identified and located at the pupil position, reducing interference from non-pupil regions of the target image and reducing subsequent data processing volume, thereby improving the pupil center localization accuracy and pupil center localization rate, and improving gaze tracking accuracy and gaze tracking timeliness; by filtering edge points at corresponding positions in the first pupil edge image based on the gray values ​​of each pixel in the binarized pupil image, the interference of factors such as light spots on pupil localization is reduced, thereby improving the accuracy of region fitting results, and thus improving the localization accuracy of the pupil center point.

[0088] Combination Figure 2 In this embodiment of the application, S3 includes:

[0089] S301. Select the target pixel in the pupil region image; the gray value of the target pixel is less than or equal to the preset gray value; specifically, the preset gray value can be 100 or 150.

[0090] S302. Determine the multiple gray values ​​corresponding to the target pixel. Multiple gray values ​​refer to the gray values ​​involved in the target pixel, excluding duplicate gray values. For example, if the target pixel includes five pixels, and the gray values ​​corresponding to the five pixels are 90, 70, 60, 50, and 60 respectively, after removing the duplicate gray value 60, the multiple gray values ​​are 90, 70, 60, and 50.

[0091] S303. Count the number of target pixels corresponding to multiple gray values; specifically, pixels with gray values ​​greater than the preset gray value can be considered as noise, such as the white of the eye and light spots; therefore, non-noise pixels are selected for statistics to improve the statistical accuracy, thereby improving the accuracy of determining the reference gray value threshold and the accuracy of pupil center positioning.

[0092] S304. Determine the reference grayscale threshold; the number of target pixels corresponding to the reference grayscale threshold is greater than the number of target pixels corresponding to each of the multiple grayscale values ​​other than the reference threshold; for example, if the target pixels include five pixels, and the grayscale values ​​corresponding to the five pixels are 90, 70, 60, 50 and 60 respectively, and grayscale values ​​90, 70 and 50 each correspond to 1 target pixel, and grayscale value 60 corresponds to 2 target pixels, then the reference grayscale threshold is 60.

[0093] S305. Based on the reference grayscale threshold and the grayscale values ​​of each pixel in the pupil region image, determine the binarization segmentation threshold; the binarization segmentation threshold T2 refers to the threshold for turning the pupil region image into a black-and-gray image. Specifically, the reference grayscale threshold is used as the maximum value of the pupil region image binarization process, thereby determining the binarization segmentation threshold in the binarization process; specifically, the above-mentioned binarization segmentation threshold can be calculated between 0 and T1 using the Otsu method (also known as the maximum variance inter-class method).

[0094] S306. The reference grayscale threshold and the binarization segmentation threshold are weighted to obtain the target segmentation threshold. The target segmentation threshold is the threshold that turns the pupil region image into a black and white image. Pixels in the pupil region image with grayscale values ​​greater than the target segmentation threshold become 0, and pixels with grayscale values ​​less than or equal to the target segmentation threshold become 255.

[0095] S307. The pupil region image is binarized based on the target segmentation threshold to obtain a binarized pupil image. Specifically, pixels with gray values ​​greater than the target segmentation threshold in the pupil region image are changed to 0 (black area), and pixels with gray values ​​less than or equal to the target segmentation threshold are changed to 255 (white area), thus obtaining a binarized pupil image.

[0096] In this embodiment, the formula for weighting the reference grayscale threshold and the binarization segmentation threshold can be the following formula (1):

[0097] T = (T1 + T2) / 2 (1)

[0098] Where T1 refers to the reference grayscale threshold, T2 refers to the binarization segmentation threshold, and T refers to the target segmentation threshold.

[0099] In this embodiment, a reference grayscale threshold is obtained by statistically analyzing the grayscale values ​​of the target pixels, and a binarization segmentation threshold is determined based on the reference grayscale threshold and the grayscale values ​​of each pixel in the pupil region. The reference grayscale threshold and the binarization segmentation threshold are weighted to obtain the target segmentation threshold, which reduces the impact of noise on the target segmentation threshold and reduces the impact of the grayscale values ​​of pixels in the non-pupil center region of the pupil region image on the binarized pupil image, thereby improving the positioning accuracy of the pupil center point.

[0100] refer to Figure 3 In this embodiment of the application, S4 includes:

[0101] S401. The gray values ​​of the edge points in the first edge image are compared with the corresponding pixels in the binarized pupil image to obtain the comparison results of each edge point. Gray value comparison refers to comparing the gray values ​​of the edge points in the first edge image with the corresponding pixels in the binarized pupil image.

[0102] S402. If the comparison result of the edge points indicates that the gray value of the edge point is inconsistent with that of the pixel at the corresponding position, delete the edge point in the first pupil edge image; if the gray value of the edge point is inconsistent with that of the pixel at the corresponding position, it indicates that the edge point belongs to the edge point of the non-center region of the pupil; deleting the edge point in the first pupil edge image can mean changing the gray value of the edge point to 255 (black), or it can mean deleting the edge point coordinates.

[0103] In this embodiment, by deleting edge points in non-pupil center regions, the influence of edge points in non-pupil center regions on subsequent region fitting is reduced, thereby improving the fitting accuracy of subsequent region fitting and thus improving the pupil center recognition accuracy.

[0104] refer to Figure 4In this embodiment of the application, S1 includes:

[0105] S101. Perform feature extraction on the target image to determine the center point of the eyes in the target image; specifically, feature extraction can be performed using a deep learning model to extract features from the target image. For example, the classic convolutional neural network model YOLOv5 can be used to extract features from the target image and output the aforementioned center point of the eyes; specifically, key point localization can be performed on the pupil region of the target image, for example, see Figure 5 Seven key points can be used to locate the pupil area; in another embodiment, four key points can also be used for location.

[0106] S102. Expand the region around the center point of the eye to obtain an eye positioning image; region expansion refers to expanding the center point of the eye into a region, which can be a rectangular region or a circular region; preferably, the eye positioning image after region expansion is a rectangular region of 80 pixels * 60 pixels, or it can be a circular region with a radius of 70 pixels.

[0107] S103. Perform Gaussian filtering on the eye localization image to obtain the pupil region image; Gaussian filtering is a linear smoothing filtering method, specifically used to eliminate Gaussian noise.

[0108] In this embodiment, by employing feature extraction and region expansion, an eye positioning image is obtained, and then the image acquired at a medium to long distance is positioned to the eye region, reducing the amount of data required for pupil center positioning calculation, thereby improving the accuracy and speed of pupil center positioning; by employing Gaussian filtering, the influence of Gaussian noise on the pupil region image is reduced, thereby improving the accuracy of the pupil region image, and thus improving the positioning accuracy of the pupil center.

[0109] refer to Figure 6 In this embodiment of the application, S2 includes:

[0110] S201. Perform gradient processing on the pupil region image to obtain the first pupil gradient image. Gradient processing refers to calculating the pixel change rate of pixels in the pupil region image based on a preset gradient operator. Specifically, the greater the gray value change rate at the image edge, the greater the gradient value; the smaller the gray value change rate in the smooth part of the image, the smaller the gradient value. The preset gradient operator can be the Sobel operator. Specifically, the size of the preset gradient operator is 5 pixels * 5 pixels.

[0111] S202. Gradient filtering is performed on the first pupil gradient image based on a preset gradient range to obtain the second pupil gradient image. Gradient filtering refers to deleting edge points that are not within the preset gradient range, that is, sharp noise filtering is performed on the first pupil gradient image to improve the accuracy of image edge points.

[0112] S203. Perform morphological filtering on the edge points in the second pupil gradient image to obtain a morphologically filtered image. Morphological filtering refers to performing morphological processing on the edge points in the second pupil gradient image based on a preset template. Specifically, morphological processing includes edge point erosion and edge point dilation.

[0113] refer to Figure 7 In this embodiment of the application, the preset template is divided into template a (reference). Figure 7 a) Template b (reference) Figure 7 b) Template c (reference) Figure 7 c) Template d (reference) Figure 7 d) Template e (reference) Figure 7 e) and template f (reference) Figure 7 f) The template includes edge points to be processed, other edge points, and non-edge points. Specifically, gray represents edge points to be processed, white represents other edge points, and black represents non-edge points. In the case of templates b and c, the edge points to be processed in the template are changed to non-edge points. In the case of templates a, d, e, and f, the coordinates of the edge points to be processed in the template are masked to prevent the edge points from participating in subsequent operations.

[0114] S204. Perform discrete edge point filtering on the edge points in the morphologically filtered image to obtain the first pupil edge image. Discrete edge point filtering refers to filtering edge points that are not within the preset range. Specifically, the edge points can be initially fitted using least squares to obtain an initial ellipse. Edge points that are far from the initial ellipse are deleted to reduce the noise impact of eyebrows, some light spots, and eyelids on the image.

[0115] In this embodiment, the first pupil gradient image is filtered multiple times using gradient filtering, morphological filtering, and discrete edge point filtering to obtain the first pupil edge image, thereby reducing noise from various pixels in the first pupil edge image and improving the accuracy of pupil center localization.

[0116] refer to Figure 8 In this embodiment of the application, S5 includes:

[0117] S501. Fit adjacent edge points on the second pupil edge image with line segments to obtain multiple fitted line segments; line segment fitting refers to fitting adjacent pixel points into a line segment.

[0118] In a specific embodiment of this application, line segment fitting includes:

[0119] Obtain discrete pixels; discrete pixels refer to pixels that do not form line segments.

[0120] Line segments are constructed based on discrete pixels and neighboring pixels; neighboring pixels refer to pixels within a preset pixel distance from discrete pixels. Specifically, the preset pixel distance can be within 3 pixels; preferably, it can be neighboring pixels that are 2 pixels apart or neighboring pixels that are 3 pixels apart.

[0121] S502. Based on the centroids of multiple fitted line segments and the edge points on their respective fitted line segments, perform straight-line filtering to determine the edge image of the third pupil; the centroid of the fitted line segment refers to the center of the line segment. If the distance between the centroid and any edge point in the line segment is less than a preset pixel distance, then the line segment is assumed to be a straight line; preferably, the preset pixel distance is 3 pixels; the edge points on the line segment are masked or deleted; if the distance between the centroid and any edge point in the line segment is greater than a preset distance, then the line segment is assumed to be a curve, and the edge points on the curve are retained.

[0122] S503. Based on the edge points in the third pupil edge image, perform ellipse fitting to determine the pupil center.

[0123] In this embodiment, since the edge of the pupil region is expected to be a curve, by using straight line filtering, the interference of edge points on the straight line on the subsequent fitting is avoided, and the computational load of the subsequent fitting is reduced, thereby improving the accuracy of pupil center positioning and the timeliness of pupil center positioning.

[0124] refer to Figure 9 In this embodiment of the application, S503 includes:

[0125] S5031. Based on the edge points in the third pupil edge image, perform curve filtering to obtain a fitted curve; curve filtering refers to filtering out curves that do not conform to the pupil edge; specifically, the center of the pupil is dark (black), so the gray value of the curve at the edge of the pupil center region is greater than that of other edge curves.

[0126] In a specific embodiment of this application, S5031 includes:

[0127] Curve fitting was performed based on edge points in the third pupil edge image to obtain multiple preliminary fitting curves;

[0128] The average gray value is calculated based on the neighboring pixels corresponding to each of the multiple preliminary fitting curves, resulting in the gray value of each of the multiple preliminary fitting curves. Specifically, the neighboring pixels corresponding to each of the multiple preliminary fitting curves can be pixels at a preset pixel distance from the line point. The preset pixel distance can be 2 or 3. The gray value refers to the calculated average gray value.

[0129] Based on the curve length and grayscale result value of each of the multiple preliminary fitting curves, the fitting curve is determined; the curve length refers to the number of pixels of the preliminary fitting curve; specifically, the curve length of the fitting curve is greater than the length of other preliminary fitting curves, and the grayscale result value of the fitting curve is greater than the grayscale result value of other preliminary fitting curves.

[0130] In this embodiment of the application, curve filtering is performed to obtain a fitted curve, thereby reducing the computational load of ellipse fitting, thereby improving the accuracy of pupil center positioning and the timeliness of pupil center positioning.

[0131] S5032. Perform ellipse fitting based on the fitted curve to obtain a fitted ellipse; ellipse fitting refers to forming a complete ellipse from the fitted curve.

[0132] S5033. If the fitted ellipse satisfies the preset ellipse radius ratio, preset ellipse area, and preset ellipse grayscale threshold, the target ellipse is determined to be the fitted ellipse. Specifically, since the target image acquired by the image acquisition device can deflect and distort the pupil, but the deflection and distortion have a preset threshold, the fitted ellipse can be determined to conform to the preset ellipse radius if the ratio of the major axis to the minor axis of the ellipse is less than or equal to the preset ellipse radius ratio. The preset ellipse radius ratio can be 3.

[0133] Since there is a preset distance between the image acquisition device and the pupil, it is possible to determine that the fitted ellipse conforms to the preset ellipse area when the ellipse area is less than or equal to the preset ellipse area; wherein, the preset ellipse area can be 0.5% to 10% of the target image area.

[0134] Since the gray value of the central region of the pupil is higher than that of the surrounding region, the fitted ellipse can be determined to conform to the preset ellipse gray value threshold if the gray value of each pixel inside the ellipse is greater than or equal to the preset ellipse gray value threshold; wherein, the preset ellipse gray value threshold can be 10.

[0135] In another embodiment of this application, if the fitted ellipse does not meet any of the preset ellipse radius, preset ellipse area, and preset ellipse grayscale threshold, an unidentified center result is output. The unidentified center result indicates that the pupil center point could not be identified, thereby avoiding the adverse effects of an incorrect pupil center on subsequent gaze tracking and thus improving the error tolerance of gaze tracking.

[0136] S5034. Determine the pupil center based on the target ellipse.

[0137] In this embodiment, the target ellipse is determined based on the preset ellipse radius ratio, the preset ellipse area, and the preset ellipse grayscale threshold, so that the target ellipse meets the preset conditions, avoiding the fitted ellipse not being the ellipse of the pupil center region, thereby improving the ellipse fitting accuracy and the pupil center positioning accuracy.

[0138] In this embodiment of the application, S5034 includes:

[0139] Based on a preset scaling range, the target ellipse is scaled proportionally to obtain multiple scaled ellipses. Proportional scaling means multiplying the major and minor axes of the target ellipse by the same scaling factor to obtain scaled ellipses. The preset scaling range refers to the scaling ratio range during the proportional scaling process, i.e., the scaling factor. Specifically, the preset scaling range is 0.95 to 0.8.

[0140] Ellipse adjustments are performed based on multiple scaled ellipses and a target ellipse, respectively, to obtain the adjusted ellipse corresponding to each of the multiple scaled ellipses; specifically:

[0141] Boundary point filtering is performed based on the distance between the boundary points of the target ellipse and the multiple scaled ellipses to obtain multiple remaining boundary points corresponding to each of the multiple scaled ellipses. Boundary point filtering means that the boundary point is no longer used as the boundary of the ellipse. Specifically, if the distance between the boundary point of the target ellipse and the multiple scaled ellipses is greater than a preset pixel distance, the boundary point is deleted. Preferably, the preset pixel distance can be 3 pixels or 2 pixels.

[0142] Multiple adjusted ellipses are obtained by fitting ellipses to the remaining boundary points corresponding to each of the multiple scaled ellipses.

[0143] In this embodiment, by adjusting the target ellipse, multiple adjusted ellipses are obtained, reducing the influence of pixels inside the target ellipse on ellipse fitting, thereby improving the accuracy of ellipse fitting and thus improving the accuracy of pupil center positioning.

[0144] The elliptic arithmetic of each adjustment ellipse is calculated based on the gray values ​​of pixels in the pupil region image. The elliptic arithmetic of the adjustment ellipse represents the smoothness of the adjustment ellipse. Specifically, the elliptic arithmetic can be calculated using the following formula (2):

[0145] el=a*(1+|b|) (2)

[0146] Where el refers to adjusting the ellipse, a refers to adjusting the grayscale value of the ellipse, and b refers to adjusting the number of boundary points in the ellipse; adjusting the grayscale value of the ellipse refers to adjusting the average grayscale value inside the ellipse.

[0147] The pupil center ellipse is determined based on the elliptic abbreviated values ​​of multiple adjustment ellipses. Specifically, the adjustment ellipse with the smallest abbreviated value is selected as the pupil center ellipse. If multiple adjustment ellipses have the smallest abbreviated values, the adjustment ellipse with the most boundary points is selected as the pupil center ellipse.

[0148] The center of the pupil center ellipse is determined as the pupil center.

[0149] In this embodiment, the pupil center ellipse is determined based on the ellipse corresponding to each of the multiple adjustment ellipses, so that the fitted ellipse better matches the pupil center ellipse, thereby improving the fitting accuracy of the pupil center ellipse and thus improving the pupil center positioning accuracy.

[0150] refer to Figure 10 In this embodiment of the application, after S1, the above method further includes:

[0151] S6. Calculate the average gray value of the pixels in the pupil region image; the average gray value T3 refers to the gray value obtained by weighted calculation based on the gray values ​​of the pixels in the pupil region image.

[0152] S7. Based on the average gray value and the gray value of each pixel in the pupil region image, determine the reflection pixel threshold; the reflection pixel threshold refers to the threshold for segmenting each pixel in the pupil region image into a binary image. For details, refer to... Figure 11 The first reflective pixel threshold T4 can be calculated between T3 and 255 using the maximum variance inter-class method (OTSU, also known as the Otsu method).

[0153] Specifically, the first reflection pixel threshold T4 binarizes the pupil region image to obtain the background and foreground; the background refers to the black area of ​​the binarized image, and the foreground refers to the white area of ​​the binarized image; specifically, assuming the image grayscale range is [0, L-1], the mean of the foreground can be calculated using the following formula (3):

[0154]

[0155] Where u0(t) refers to the mean of the foreground, t refers to any gray value belonging to [0, L-1], and p i P0(t) refers to the probability of each gray value appearing, where i is the gray value and P0(t) is the proportion of the foreground to the overall image.

[0156] Specifically, the mean of the background can be calculated using the following formula (4):

[0157]

[0158] Where u1(t) refers to the mean of the background, t refers to any gray value belonging to [0, L-1], and p i P1(t) refers to the probability of each gray value appearing, where i is the gray value and P1(t) is the proportion of the background to the overall image.

[0159] Specifically, the variance of the foreground can be calculated using the following formula (5):

[0160]

[0161] Where σ0(t) is the variance of the foreground, u0(t) is the mean of the foreground, t is any gray value belonging to [0, L-1], and p i This refers to the probability of each grayscale value appearing, where i refers to the grayscale value.

[0162] Specifically, the variance of the background can be calculated using the following formula (6):

[0163]

[0164] Where σ1(t) is the variance of the background, u1(t) is the mean of the background, t is any gray value belonging to [0, L-1], and p i This refers to the probability of each grayscale value appearing, where i refers to the grayscale value.

[0165] If u0(t), u1(t), σ0(t), and σ1(t) satisfy the preset formula (7), then the first reflection pixel threshold is determined to be T4 as the reflection pixel threshold:

[0166]

[0167] in, The preset judgment threshold is set to 2 to 3, and preferably 2.5.

[0168] In another embodiment of this application, if u0(t), u1(t), σ0(t), and σ1(t) do not satisfy formula (7), the first reflection threshold T4 is determined as the updated average gray value; based on the updated average gray value and the gray value of each pixel in the pupil region image, the reflection pixel threshold is determined; specifically, it can be calculated between T4 and 255 using the maximum variance inter-class method (OTSU, also known as the Otsu method) until u0(t), u1(t), σ0(t), and σ1(t) satisfy the second reflection pixel threshold T5 of formula (7); and then the second reflection pixel threshold T5 is determined as the reflection pixel threshold.

[0169] S8. Binarize the pupil region image based on the reflection pixel threshold to obtain a binary reflection image; specifically, if the gray value of a pixel in the pupil region image is less than or equal to the reflection pixel threshold T4, the gray value of the pixel is transformed to 0; if the gray value of a pixel in the pupil region image is greater than the reflection pixel threshold T4, the gray value of the pixel is transformed to 255.

[0170] S9. Determine the centroid of the binarized reflectance image; the centroid is the image center of gravity.

[0171] S10. Expand the region with the image centroid as the center point to obtain the corneal reflection image; region expansion refers to expanding the image centroid into a region, which can be a rectangular region or a circular region.

[0172] S11. Gaussian center fitting is performed based on the corneal reflection image to obtain the corneal reflection center; specifically, binarization calculation is performed between 0 and 255 based on the maximum variance inter-class method (OTSU, also known as Otsu's method) to obtain the corneal reflection contour image corresponding to the corneal reflection center, and Gaussian center fitting is performed based on the corneal reflection contour image to obtain the corneal reflection center.

[0173] In this embodiment, the reflection pixel threshold is determined based on the average gray value and the gray value of each pixel in the pupil region image, thereby improving the accuracy of the reflection pixel threshold in the binarization process and thus improving the accuracy of corneal reflection center positioning.

[0174] refer to Figure 12 , Figure 12 This refers to the actual test diagram of the positioning results of pupil center positioning and corneal reflection center positioning in the embodiments of this application; the test results show that the pupil center positioning method in the embodiments of this application can accurately locate the pupil center and corneal reflection center, thereby improving the tracking accuracy and the timeliness of gaze tracking.

[0175] On the other hand, embodiments of this application also provide a pupil center positioning device, referencing Figure 13 The device includes:

[0176] The pupil region localization module 1001 is used to locate the pupil region of the target image and obtain a pupil region image;

[0177] The edge detection module 2001 is used to perform edge detection on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image; the first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points;

[0178] The binarization processing module 3001 is used to perform binarization processing on the pupil region image based on the gray values ​​of the pixels in the pupil region image, so as to obtain the binarized pupil image corresponding to the pupil region image.

[0179] The image fusion module 4001 is used to perform edge point filtering on the edge points at corresponding positions in the first pupil edge image based on the gray values ​​of each pixel in the binarized pupil image, so as to obtain the second pupil edge image.

[0180] The pupil center localization module 5001 is used to perform region fitting based on the edge points in the second pupil edge image, and determine the pupil center point based on the region fitting result.

[0181] The binarization processing module includes:

[0182] The target pixel selection unit is used to select target pixels in the pupil region image; the grayscale value of the target pixel is less than or equal to a preset grayscale value.

[0183] Multiple grayscale value determination units are used to determine multiple grayscale values ​​corresponding to the target pixel.

[0184] The statistics unit is used to count the number of target pixels corresponding to multiple grayscale values;

[0185] The reference grayscale threshold determination unit is used to determine the reference grayscale threshold; the number of target pixels corresponding to the reference grayscale threshold is greater than the number of target pixels corresponding to each of the multiple grayscale values ​​other than the reference grayscale threshold.

[0186] The binarization segmentation threshold determination unit is used to determine the binarization segmentation threshold based on the reference grayscale threshold and the grayscale values ​​of each pixel in the pupil region image.

[0187] The weighted processing unit is used to weight the reference grayscale threshold and the binarized segmentation threshold to obtain the target segmentation threshold;

[0188] The binarization processing unit is used to perform binarization processing on the pupil region image based on the target segmentation threshold to obtain a binarized pupil image.

[0189] The image fusion module includes:

[0190] The grayscale comparison unit is used to compare the grayscale values ​​of edge points in the first edge image with the corresponding pixel points in the binarized pupil image to obtain the comparison results of each edge point.

[0191] The deletion unit is used to delete edge points in the first pupil edge image when the gray value of the edge point is inconsistent with the gray value of the pixel point at the corresponding position in the comparison result of the edge points.

[0192] The pupil region localization module includes:

[0193] The feature extraction unit is used to extract features from the target image and determine the center point of the eye in the target image;

[0194] The region expansion unit is used to expand the region around the eye center point to obtain an eye positioning image.

[0195] The Gaussian filtering unit is used to perform Gaussian filtering on the eye localization image to obtain the pupil region image.

[0196] The edge detection module includes:

[0197] The gradient processing unit is used to perform gradient processing on the pupil region image to obtain the first pupil gradient image.

[0198] The gradient filtering unit is used to perform gradient filtering on the first pupil gradient image based on a preset gradient range to obtain the second pupil gradient image.

[0199] The morphological processing unit is used to perform morphological filtering on the edge points in the second pupil gradient image to obtain a morphologically filtered image.

[0200] The discrete edge point filtering unit is used to perform discrete edge point filtering on the edge points in the morphologically filtered image to obtain the first pupil edge image.

[0201] The pupil center positioning module includes:

[0202] The line segment fitting unit is used to fit adjacent edge points on the second pupil edge image with line segments to obtain multiple fitted line segments.

[0203] The line filtering unit is used to perform line filtering based on the centroids of multiple fitted line segments and the edge points on their respective fitted line segments to determine the edge image of the third pupil.

[0204] The ellipse fitting unit is used to perform ellipse fitting based on the edge points in the third pupil edge image to determine the pupil center.

[0205] The ellipse fitting unit includes:

[0206] The curve filtering unit is used to perform curve filtering based on edge points in the third pupil edge image to obtain a fitted curve.

[0207] The ellipse fitting unit is used to fit an ellipse based on a fitted curve to obtain the fitted ellipse.

[0208] The ellipse filtering unit is used to determine the fitted ellipse as the target ellipse if the fitted ellipse meets the preset ellipse radius ratio, preset ellipse area, and preset ellipse grayscale threshold.

[0209] A pupil center determination unit is used to determine the pupil center based on the target ellipse.

[0210] The pupil center determination unit includes:

[0211] The scaling subunit is used to scale the target ellipse proportionally based on a preset scaling range to obtain multiple scaled ellipses.

[0212] An ellipse adjustment unit is used to perform ellipse adjustment based on the plurality of scaled ellipses and the target ellipse respectively, to obtain the adjustment ellipse corresponding to each of the plurality of scaled ellipses;

[0213] The calculation subunit is used to calculate the elliptic curve corresponding to each of the multiple adjustment ellipses based on the gray values ​​of the pixels in the pupil region image.

[0214] The pupil center ellipse determination subunit is used to determine the pupil center ellipse based on the ellipse corresponding to each of the multiple adjustment ellipses.

[0215] The pupil center determination subunit is used to determine the center of the pupil center ellipse as the pupil center.

[0216] The device includes:

[0217] The average grayscale calculation module is used to calculate the average grayscale value of pixels in the pupil region image;

[0218] The reflective pixel threshold determination module is used to determine the reflective pixel threshold based on the average gray value and the gray value of each pixel in the pupil region image.

[0219] The binarization processing module is used to perform binarization processing on the pupil region image based on the reflection pixel threshold to obtain a binarized reflection image;

[0220] The centroid determination module is used to determine the image centroid of the binarized reflectance image;

[0221] The region expansion module is used to expand the region with the image centroid as the center point to obtain the corneal reflection image;

[0222] The Gaussian fitting module is used to perform Gaussian center fitting based on the corneal reflection image to obtain the corneal reflection center.

[0223] This application also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction or at least one program. The processor loads and executes the at least one instruction or at least one program to implement the pupil center localization method as described above.

[0224] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one hard disk drive, flash memory, or other volatile solid-state storage devices. Correspondingly, memory can also include a memory controller to provide the processor with access to the memory.

[0225] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 14 This is a structural block diagram of the electronic device provided in the embodiments of this application. For example... Figure 14 As shown, the electronic device 900 can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the electronic device 900. Electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0226] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module for wireless communication with the Internet.

[0227] Those skilled in the art will understand that Figure 14 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 14 The more or fewer components shown, or having the same Figure 14 The different configurations shown.

[0228] Embodiments of this application also provide a storage medium storing at least one instruction or at least one program, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the pupil center localization method as described above.

[0229] The foregoing description has fully disclosed the specific embodiments of this application. It should be noted that any modifications made by those skilled in the art to the specific embodiments of this application do not depart from the scope of the claims. Accordingly, the scope of the claims of this application is not limited to the foregoing specific embodiments.

Claims

1. A method for locating the center of the pupil, characterized in that, include: Pupil region localization is performed on the target image to obtain a pupil region image; Edge detection is performed on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image; The first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points; Based on the gray values ​​of the pixels in the pupil region image, the pupil region image is binarized to obtain the binarized pupil image corresponding to the pupil region image. Based on the grayscale values ​​of each pixel in the binarized pupil image, edge point filtering is performed on the edge points at corresponding positions in the first pupil edge image to obtain the second pupil edge image. Region fitting is performed based on the edge points in the second pupil edge image, and the pupil center point is determined based on the region fitting result. The step of filtering edge points at corresponding positions in the first pupil edge image based on the grayscale values ​​of each pixel in the binarized pupil image to obtain the second pupil edge image includes: The grayscale values ​​of the edge points in the first pupil edge image are compared with the corresponding pixels in the binarized pupil image to obtain the comparison results of each edge point. If the comparison result of the edge points indicates that the gray value of the edge point is inconsistent with that of the pixel point at the corresponding position, the edge point in the first pupil edge image is deleted.

2. The pupil center positioning method according to claim 1, characterized in that, The step of binarizing the pupil region image based on the grayscale values ​​of pixels in the pupil region image to obtain a binarized pupil image corresponding to the pupil region image includes: Select a target pixel in the pupil region image; the grayscale value of the target pixel is less than or equal to a preset grayscale value. Determine multiple grayscale values ​​corresponding to the target pixel; Count the number of target pixels corresponding to the multiple grayscale values; A reference grayscale threshold is determined; the number of target pixels corresponding to the reference grayscale threshold is greater than the number of target pixels corresponding to each of the plurality of grayscale values ​​other than the reference grayscale threshold. Based on the reference grayscale threshold and the grayscale value of each pixel in the pupil region image, a binarization segmentation threshold is determined. The target segmentation threshold is obtained by weighting the reference grayscale threshold and the binarized segmentation threshold. The pupil region image is binarized based on the target segmentation threshold to obtain the binarized pupil image.

3. The pupil center localization method according to claim 1, characterized in that, The process of locating the pupil region in the target image to obtain a pupil region image includes: Feature extraction is performed on the target image to determine the center point of the eye in the target image; The eye localization image is obtained by expanding the area around the center point of the eye. Gaussian filtering is applied to the eye localization image to obtain the pupil region image.

4. The pupil center positioning method according to claim 1, characterized in that, The step of performing edge detection on the pupil region image to obtain the first pupil edge image corresponding to the pupil region image includes: Gradient processing is performed on the pupil region image to obtain a first pupil gradient image; The first pupil gradient image is subjected to gradient filtering based on a preset gradient range to obtain the second pupil gradient image; Morphological filtering is performed on the edge points in the second pupil gradient image to obtain a morphologically filtered image; Discrete edge point filtering is performed on the edge points in the morphologically filtered image to obtain the first pupil edge image.

5. The pupil center positioning method according to claim 1, characterized in that, The step of performing region fitting based on edge points in the second pupil edge image, and determining the pupil center point based on the region fitting result, includes: By fitting line segments to adjacent edge points on the second pupil edge image, multiple fitted line segments are obtained; Based on the centroids of the multiple fitted line segments and the edge points on their respective fitted line segments, straight line filtering is performed to determine the edge image of the third pupil. The center of the pupil is determined by ellipse fitting based on the edge points in the third pupil edge image.

6. The pupil center positioning method according to claim 5, characterized in that, The step of determining the pupil center by performing ellipse fitting based on the edge points in the third pupil edge image includes: Curve filtering is performed based on the edge points in the third pupil edge image to obtain a fitted curve; Based on the fitted curve, an ellipse is fitted to obtain the fitted ellipse; If the fitted ellipse satisfies the preset ellipse radius ratio, preset ellipse area, and preset ellipse grayscale threshold, the fitted ellipse is determined to be the target ellipse; The center of the pupil is determined based on the target ellipse.

7. The pupil center positioning method according to claim 6, characterized in that, Determining the pupil center based on the target ellipse includes: Based on a preset scaling range, the target ellipse is scaled proportionally to obtain multiple scaled ellipses; Ellipse adjustments are performed based on the plurality of scaled ellipses and the target ellipse respectively to obtain the adjustment ellipse corresponding to each of the plurality of scaled ellipses; Calculate the ellipse corresponding to each of the multiple adjustment ellipses based on the gray values ​​of the pixels in the pupil region image; The pupil center ellipse is determined based on the ellipse corresponding to each of the multiple adjustment ellipses. The center of the pupil center ellipse is determined as the pupil center.

8. The pupil center positioning method according to claim 1, characterized in that, After locating the pupil region in the target image to obtain the pupil region image, the method further includes: Calculate the average gray value of the pixels in the pupil region image; Based on the average gray value and the gray value of each pixel in the pupil region image, the reflection pixel threshold is determined. The pupil region image is binarized based on the reflection pixel threshold to obtain a binarized reflection image; Determine the image centroid of the binarized reflectance image; By expanding the region with the centroid of the image as the center point, a corneal reflection image is obtained; The corneal reflection center is obtained by performing Gaussian center fitting based on the corneal reflection image.

9. A pupil center positioning device, characterized in that, include: The pupil region localization module is used to locate the pupil region in the target image and obtain a pupil region image; The edge detection module is used to perform edge detection on the pupil region image to obtain a first pupil edge image corresponding to the pupil region image; The first pupil edge image includes multiple image region edges, and each of the multiple image region edges includes multiple edge points; The binarization processing module is used to perform binarization processing on the pupil region image based on the gray values ​​of the pixels in the pupil region image to obtain the binarized pupil image corresponding to the pupil region image. The image fusion module is used to perform edge point filtering on the edge points at corresponding positions in the first pupil edge image based on the gray value of each pixel in the binarized pupil image to obtain the second pupil edge image. The pupil center localization module is used to perform region fitting based on the edge points in the second pupil edge image, and determine the pupil center point based on the region fitting result. The step of filtering edge points at corresponding positions in the first pupil edge image based on the grayscale values ​​of each pixel in the binarized pupil image to obtain the second pupil edge image includes: The grayscale values ​​of the edge points in the first pupil edge image are compared with the corresponding pixels in the binarized pupil image to obtain the comparison results of each edge point. If the comparison result of the edge points indicates that the gray value of the edge point is inconsistent with that of the pixel point at the corresponding position, the edge point in the first pupil edge image is deleted.