Marker tracking - RobinAmsters/benchmarking GitHub Wiki
Before you can start tracking the position of a marker, make sure the camera is calibrated first. Next, you can generate one or more tags with the generate_tag.py script. This will generate tags of a certain image size in pixels. Print this tag and fix it to the object you want to track. Make sure you measure the real world dimension of the tag. You can predetermine the physical size of the marker by setting its real world dimensions in for example word or inkscape before printing the tag.
Then, record a video of the object to track with the marker clearly visible. Lighting has a significant influence on tracking performance, so use sufficient and preferably even lighting.
Finally, you can use the detect_marker.py script to determine the position of the marker in the video in postprocessing. In the example_data folder, a camera parameters file and a video is provided for testing purposes.