made with the help of this website: https://pyimagesearch.com/2020/11/02/apriltag-with-python/
focal length calculated with code from here: https://pyimagesearch.com/2015/01/19/find-distance-camera-objectmarker-using-python-opencv/
Dependancies
opencv: sudo apt-get install python3-opencv
apriltag 0.0.16: pip install apriltag
Before First Use
- Ensure focal length is calculated for your camera
- change device_number to your camera
- Measure width of your apriltag in inches and set variable KNOWN_TAG_WIDTH to that value