Abstract
Limiting a distance is one of the popular terms for objects such as pedestrians, vehicles, and boats moving on traffic routes. Subjects must maintain a sufficient distance to ensure safety and prevent possible collisions. To be able to estimate the safe distance, this study applies the Euclidean distance determination algorithm to be able to predict the safe distance between moving objects. First, we will use the YOLOv8 deep neural network to detect objects and the OpenCV library to process images; The distance between objects is then estimated for any pair of objects in the frame, which will be indicated by a red border if unsafe, otherwise by a blue or yellow border. The proposed method has been tested and evaluated for videos recording scenes of: pedestrians on the road, vehicles on the route or boats traveling on the channel.