For augmented reality to work properly on a device, we need to know some information about that device's camera. The "ARToolKit Camera Calibrator" app allows ARToolKit to better understand the camera and lens on your Android device. Producing good quality calibrations using this app can be used to improve ARToolKit tracking on your device.
All data captured in this app goes into the ARToolKit lens calibration data server, to help everyone who uses the same type of phone as you do augmented reality with ARToolKit.
The calibration pattern consists of a grid of black and white squares surrounded by a white border. Due to how camera lenses work, when straight lines are viewed through the camera lens, they will naturally bend in accordance to the hemisphere of the lens itself. The "ARToolKit Camera Calibrator" app locates 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. For this reason, in this app we capture 10 images.
- (OPTIONAL) The calibration chessboards can also be found under the `doc/patterns` folder of the ARToolKit SDK as `Calibration chessboard (A4).pdf`, or `Calibration chessboard (US Letter).pdf`, respectively. - (OPTIONAL) The calibration chessboards can also 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 (it looks like three vertical dots).2. Print the calibration chessboard you downloaded at 100% sizing, and be sure that no clipping of the pattern occurs.
When preparing your environment for calibrating your camera, there are a couple of best practices to keep in mind:
![The "ARToolKit Camera Calibrator" app in the Google Play Store.][play_store] The "ARToolKit Camera Calibrator" app can be installed from the Google Play Store. Once you have downloaded the app, either choose “Open” from the Play Store page, or locate the application in your app drawer and launch it from there.
The device you are using may have multiple cameras (such as front and back), as well as multiple resolution modes (sizes of images each camera can capture). You do not need to calibrate every resolution of every camera, though it would be great if you did so. When you launch the app, there should be three vertical dots in the upper right-hand corner, tap this, and then tap “Settings” from the menu that appears. First and foremost, we recommend checking the “Force landscape display” checkbox, as you will be moving the phone around at many angles, and swapping layout is not recommended.
Choosing which resolution(s) to calibrate against can be somewhat difficult. Practically every camera maker uses a different camera module, which in turn has different video modes. There is no resolution guaranteed to be available on all Android devices. That being said, 320×240 (4:3) is available on most devices. The good news is that it's not the resolution that matters as much as the aspect ratio. Therefore, we recommend you capture one resolution of each aspect ratio for the camera on your device. The most common standard aspect ratios are 4:3, 3:2, and 16:9. We recommend you calibrate for each of these three aspect ratios, if available.
Because some AR applications actually make use of the front camera! If your application uses the front camera, or you want to do a good service, we recommend you follow the above resolution recommendations for the front camera also.
Press the back button (left triangle) to return to the camera feed, and tap the screen in the center box to begin. You will be capturing a total of 10 images during this calibration. In the bottom-center of the capture window is displayed the number of images captured so far. Touching the screen captures an image, so be careful as you reposition yourself. You can always repeat these 10 image captures again if it did not go well the first time.
good_bad.png Point the camera at the chessboard grid, and the inner corners of the squares will be highlighted with “X” marks and numbered. Be sure to keep the entire chessboard in view, and hold still during capture.
When the camera can clearly see all the intermediate corners, the X marks turn RED, and a calibration image can be captured- This is good! On the other hand, if some of the corners are obscured by the edges of the camera frame, or poor lighting or reflection, the crosses will be GREEN, and no calibration image can be captured until the optical conditions are changed. This is bad!
In order to obtain a good calibration for the camera, it is important to obtain images of the calibration board at a variety of angles to the camera lens. The images below give examples of the configurations of the calibration board you should try to obtain. framed1.png framed2.png Capturing these images involves holding the camera at different angles to the board, including upside-down. We do not recommend exceeding an angle of 45 degrees during capture. Do this a total of 10 times.
Once you've captured all 10 images, the screen will display “Calculating camera parameters…”. Once it has finished it will display your results, like so: results.png This screen displays the minimum, maximum, and average error from the frames captured. In general, having an error threshold below 1.0 is good. If your standard error is above 5 on a non-HD resolution, we recommend you complete the calibration again, being careful with camera focus, chessboard flex, and lighting.
Congratulations! You've calibrated your camera! We recommend you go and calibrate for the rest of the recommended aspect ratios, listed above.
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 (a structure known as ARParam, if you are familiar with the ARToolKit source).
As well as the calibration file itself, the following information is transmitted:
No personally identifying data is transmitted or stored during as part of the process. Additionally, the data is uploaded via a secure HTTPS connection.
Last modified: 2016/02/15 05:41 (external edit)