The present invention discloses an
image processing algorithm for real-time extraction of
pupil center and trajectory tracking in the closed-
eye state. From the perspective of
digital image processing, this
algorithm first performs
grayscale conversion,
contrast enhancement, and
smoothing processing on each frame of the input eye video. Then, by using adaptive threshold segmentation technology and combining morphological operations and the Canny
edge detection operator, it can accurately extract the boundary of the
pupil region. Subsequently, the
least squares method based on
geometric distance is used to accurately fit the elliptical parameters of the
pupil contour, thereby obtaining the center coordinates and area information of the pupil, significantly improving the accuracy and reliability of pupil monitoring in the closed-
eye state. By recording and analyzing the changes in the pupil center position in the
time series, real-time tracking of the
pupil movement trajectory is achieved. Finally, baseline correction and
smoothing filtering
processing are adopted to evaluate the pupil
light reflex (PLR) in the closed-
eye state before and after
white light excitation. This method has the advantages of strong robustness, adaptability to light changes, high real-time performance, and high precision.