Created
June 10, 2020 04:37
-
-
Save Haleluak/7d86e45dc07ab0f4606577e55cd78a9c to your computer and use it in GitHub Desktop.
Social Distancing Detector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def Check(a, b): | |
| dist = ((a[0] - b[0]) ** 2 + 550 / ((a[1] + b[1]) / 2) * (a[1] - b[1]) ** 2) ** 0.5 | |
| calibration = (a[1] + b[1]) / 2 | |
| if 0 < dist < 0.25 * calibration: | |
| return True | |
| else: | |
| return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment