Abstract:In order to track the eyes of consumers in supermarkets and analyze their purchasing behaviors in front of the shelves, a human eye detection algorithm based on K-means was proposed. By analyzing the static images of each frame in the image sequence, the K-means clustering algorithm was used to segment the face region, calculate the face size, find the face center point, determine the eye range, find the eye coordinates, segment the eye images, and draw the vertical projection curve and horizontal projection curve of the two eyes. Then, the images of different races, different backgrounds, different angles and different postures were selected for experiments to verify the accuracy and effectiveness of the algorithm. The experimental results showed that this algorithm could accurately segment the face region from the images of different people in a complex background, and accurately locate the human eyes. The algorithm had high accuracy and good applicability, and could better realize the rapid detection of human eyes in the supermarket environment.