Abstract:pupil localization is a key step in pupil recognition. In order to solve the problems of low accuracy, missing detection and false detection in the current pupil location algorithm, this paper proposes an algorithm to accurately locate the pupil center by creating a sliding window. Firstly, CLM model is used to extract the eye region of human face, and the extracted image is preprocessed. Then, by creating a circular sliding window to scan the image and calculate the sum of the gray values of pixels in each window. Taking advantage of the fact that the gray value of the pupil is very low, the window with the lowest gray value is selected as the pupil region, and the coordinates of its center point are calculated as the coordinates of the pupil center. The experimental results show that the algorithm can accurately locate the pupil center for different test objects, and can enhance the robustness of the system.