ARToolkitPlus camera calibration
Today I was experimenting with ARToolkitPlus a software library that can be used to calculate camera position and orientation relative to physical markers in real time. To get a reliable position of the marker in a picture it is important to calibrate the camera which is used. The authors of ARToolkitPlus suggest to use the Camera Calibration Toolbox for Matlab. The toolbox is well documented and easy to use. The toolkit generates a file called Calib_Results.m.
The ARToolkitPlus needs an ASCII-file containing the following informations
[line1]: ARToolKitPlus_CamCal_Rev02
[line2]: xsize ysize cc_x cc_y fc_x fc_y kc1 kc2 kc3 kc3 kc5 kc6 iter
which can be taken from the Calib_Results.m file.
xsize, ysize: calibrated frame dimensions (does not have to match the frame dimensions at runtime)
cc_x, cc_y: principal point location (in pixels)
fc_x, fc_y: focal length (in pixels)
kc1..kc6: radial/tangential distortion coefficients (kc6 currently not in use)
iter: number of iterations for distortion compensation.
For my Sony firewire DV cam the ARToolkitPlus calibration file, created from the matlab camera calibration file from above, looks as follows.
ARToolkitPlus_SonyDVCam
360 288 170.555587873985790 156.349897479289890 4.848803600222190 5.131806560891684 -0.389314936291939 2.943393328535414 0.001258278172844 -0.002916145962022 0.00 0.00 10
