This section is very important for the Detecting/tracking the markers. It also affects the accuracy of the camera orientation. This article assumes you have experience with Visual Studio 2015.
Watch OpenCV Basics on Camera Calibration
This the minimum training needed to calibrate the camera. George Lecakes provides the tutorial. There are 4 parts to calibration.
- OpenCV Basics 14 on Camera Calibration Part 1
- OpenCV Basics 16 on Camera Calibration Part 2
- OpenCV Basics 17 on Camera Calibration Part 3
- OpenCV Basics 18 on Camera Calibration Part 4
Create a Detection Board for Calibration.
Select the project to create a pattern used for calibration.
Here are the debug setting in VS2015
Cut and paste the settings into VS2015 and run the program
“C:\\ArucoData\\Calibration\\grid_board_4x4_50_1.png” -w=7 -h=5 -l=400 -s=100 -d=0
Running the program will produce the following image. You will need to print the image a tape it to a thin (¼”) plywood board.
Calibrate the Camera.
Refer to OpenCV Basics 17 on Camera Calibration Part 3. This video shows you how to calibrate the camera.
Select the project as shown.
Calibration debug settings
Cut and Paste into vs2015 and run the program.
-w=5 -h=4 -l=0.04 -s=0.01 -d=0 -a=1 -dp=”C:\ArucoData\Markers\detector_params.yml” “C:\ArucoData\Calibration\out_camera_data1_hd1080.yml”
To calibrate the camera, place the board in the field of view of the camera. Change the orientation of the camera. The youtube video OpenCV Basics 17 on Camera Calibration Part 3 shows how to calibrate the camera. It is not hard.
Good luck.