Due to the COVID19 pandemic, contact tracing and moving object tracking are gaining more popularity in automated video surveillance systems in computer vision and video processing. The application of contact tracing and moving object tracking is critical in applying pandemic control measures and is getting more important day by day. This work proposes a computer vision-based algorithm for contact tracing using stationary surveillance cameras. The input videos are converted into a bird's eye view where all moving objects are detected, and the distances between them are calculated. The algorithm performs background subtraction to isolate foreground objects, morphological operations to remove the noise, and blob analysis to identify the connected regions in the resulting foreground video. Kalman filters to estimate objects' motion in the video calculates Euclidean distance between the objects to trace object contacts. This algorithm can be utilized in almost all public places such as shopping malls, airport terminals, and educational institutions. It allows identifying, assessing, and managing people who might have been exposed to the disease. The testing data was collected in a home environment, and the stationary camera was replaced with a mobile phone camera fixed on a tripod. The work was implemented and tested, and the results verified the feasibility and effectiveness of the proposed method. The system was able to detect the objects in the input video frame and estimate the distance between them across multiple cameras.