Click here to Skip to main content
15,672,024 members
Articles / Artificial Intelligence / Deep Learning


4 bookmarked

AI Social Distancing Detector: Calculating the Center Point of Detected People

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
9 Dec 2020CPOL2 min read
In this article, we'll calculate the center of each detected bounding box, which will serve as a base for calculating distance.
So far in the series, we learned how to detect people and find bounding boxes to indicate people's locations. In general, you can estimate distances using the closest vertices of the bounding boxes, but to keep things simple, I use the center of the bounding boxes, as shown in the figure below. I then calculate the space between them using the Euclidean formula for a plane.


Daily Counts


Weekly Counts

This article is part of the series 'AI Social Distancing Detector View All


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
Dawid Borycki is a software engineer and biomedical researcher with extensive experience in Microsoft technologies. He has completed a broad range of challenging projects involving the development of software for device prototypes (mostly medical equipment), embedded device interfacing, and desktop and mobile programming. Borycki is an author of two Microsoft Press books: “Programming for Mixed Reality (2018)” and “Programming for the Internet of Things (2017).”

Comments and Discussions