This repository shows how to generate aruco boards, calibrate a camera using those boards, and live pose estimation on those boards.
- Project was built using a VM running Ubuntu 18.04
- Install opencv-contrib.
pip install opencv-contrib-python
git clone https://github.com/ddelago/Aruco-Marker-Calibration-and-Pose-Estimation.git
- Other various packages as well, just
pip install
them as you encounter them.
There are three ways to generate calibration markers.
- Single Marker
- Generate a single ArUco marker. Can choose specific marker ID and image size.
python generate_aruco.py
- ArUco Grid
- Generates a grid of ArUco markers.
python generate_arucoGrid.py
- ChArUco Grid
- Generates a chessboard filled with ArUco markers. This is the ideal method to use when calibrating.
python generate_ChAruco.py
In orer to track objects correctly, you need to use a calibration using the camera that you will use! The calibration files in this repository were created using a Logitech C920 camera.
- Record a video of your ChAruco board in various positions. A 10-20 second long video will work.
- Use the
calibration_ChAruco.py
program to calibrate your camera. You need to specify where your calibration video is as well as the minimum number of valid ChAruco board captures you want. At least 40 valid captures worked for me.python calibration_ChAruco.py -v calibration_video.webm -c 80
After calibration, the tracking of each marker can now be performed.