.Computer vision (CV) technology refers to the process of computer simulation of human vision and has the ability to perceive the environment and technology of the human visual function. In reality, CV is essentially the study of visual perception, a discipline that studies how to make computers see as humans do. Machine vision mainly uses computers to simulate human visual functions, extract information from images of objective things, process and understand them, and finally use them for actual detection, measurement, and control. With the frequent occurrence of safety accidents, especially in swimming, it is necessary to make adequate preparations to reduce the occurrence of accidents. Swimming is affected by many external factors. While completing swimming technical movements, trainees must overcome the stimulation of water on the body and the interference of breathing, which can lead to accidents. We aim to study the safety detection device of swimming pools based on CV and use the current popular CV technology to monitor the safety problems of swimming pools. We study the target motion trajectory detection system based on CV and use Zhang’s plane calibration method to locate the camera. This research is based on how the computer back-end server realizes abnormal behavior detection, which greatly saves hardware costs. The experimental data shows that water quality is most important issue in swimming safety, accounting for 29% of the population, which indicates that water quality is the focus of users’ choosing swimming as an activity. Of those surveyed, 19 people could not deal with the risks when swimming, accounting for 24% of the total group surveyed, which indicates that people’s swimming safety coping ability needs to be improved.