ARToolKit Camera Calibration for Android
From ARToolworks support library
About the application
This application allows you to generate calibration parameters for the lens on your Android device. Good quality lens calibration can be used to improve ARToolKit tracking on your device.
After capture, lens calibration data that meets a certain minimum level of quality is saved on ARToolworks lens calibration data server, and may be shared with other users of the same model of device.
- The application requires Android v2.2 or later.
- A printer is required to print the calibration pattern.
- A network connection (e.g. wifi or cellular data) is required to upload the data. Without this, the does not serve any useful purpose.
How it works
The "Calibration pattern.pdf" image consists of a grid of black and white squares surrounded by a white border. When viewed through the camera lens, lens distortion causes the straight lines at the edges of the squares to appear curved. The calib_camera program uses the OpenCV library to locate the corners of the squares and then measures the spacing between the corners and uses this information to calculate the lens distortion. The more images captured, and the more angles they are captured from, the lower the error in the distortion measurement.
How do I use it?
Calibration works by capturing images of the pre-prepared calibration pattern with the camera. The calibration pattern can be printed from the app (via Google Cloud Print service) by selecting the "Print" button from app. To access the Print button, press the hardware menu button on the device or use the menu button on the Action Bar at the top of the screen (on Android devices without a hardware menu button).
Finally, set up your camera. A calibration file is only valid for one focus setting of the camera (although it will still work at other focal lengths), so choose in advance the focus setting for the camera which will be used most often.
- Before beginning, print out the calibration chessboard pattern and affix it to a flat surface. See Calibrating_your_camera#Setting_up.
- After launching the app, you can use the Settings menu to choose the camera and resolution to be calibrated. To access the Settings menu, press the hardware menu button on the device or use the menu button on the Action Bar at the top of the screen (on Android devices without a hardware menu button).
- Collect calibration images. See Calibrating_your_camera#Capturing_calibration_images.
- Once all images have been collected, the calibration data will be calculated, and when this is complete the results will be shown on-screen.
- The calibration data is automatically uploaded.
What information is uploaded when I use this app?
If a calibration dataset generated with the app meets a certain minimum level of quality is saved at the completion of calibration, and uploaded when a network connection is available. The calibration file itself contains lens optical and distortion parameters (basically an ARParam structure).
As well as the calibration file itself, the following information is transmitted:
- The make and model of device (e.g. Samsung Galaxy S).
- Which camera on the device the parameters apply to.
- The date and time at which the calibration file was generated.
- The calibration data quality (error values).
No personally identifying data is transmitted or stored during as part of the process. Additionally, the data is uploaded via a secure HTTPS connection.