Camera Calibration

Calibrate your external camera for mixed reality capture using the provided CameraTool.

This guide will walk you through the steps to capture information about your camera and remove any distortion present when creating a mixed reality capture scene. The CameraTool gives you the option to configure a static camera or a dynamic camera that can be moved around the scene. This guide assumes that you have previously completed the Rift and Touch setup. For best results we recommend that you have your room set up in the configuration that you will use for mixed reality capture.

Before You Begin

Before you launch the camera calibration process, please complete the following steps:

  1. Review the room and sensor setup information on Room and Sensor Setup. It is important during the camera calibration process that the VR Object (if using) is within view of at least 2 sensors. The following is an example of how the room could be configured while calibrating the camera:

  2. Review the recommended configurations on the System Configurations page. Take note of how the sensor, camera, and HMD are configured in the USB ports. Please make note of the additional requirements if you're planning to use the ZED Stereo Camera.
  3. Print out the image provided with the CameraTool (C:\Program Files\Oculus\Support\oculus-diagnostics\CameraCalibrationTool\Assets\pattern.png). Do not crop or stretch the image during the printing process, the CameraTool will not work properly if the image is altered. We recommend adhering the pattern to a flat piece of cardboard to keep the pattern flat during the calibration process. The pattern will change colors on your screen when detected properly.
  4. Cover the proximity sensor in your HMD with a sticker or piece of tape, you need to keep this sensor covered throughout the duration of the camera calibration process. The proximity sensor is located between the eye cups at the top of the HMD.

Calibrate The External Camera

In this process, you'll run the CameraTool and move a printout and your HMD around in several orientations to capture information about your camera.

To configure your camera for mixed reality capture, follow the steps below:

  1. Launch CameraTool.exe (C:\Program Files\Oculus\Support\oculus-diagnostics\CameraCalibrationTool\). Select Calibrate Camera. If you plan to use a dynamic camera with a VR Object, make sure the VR Object is active, in view of the sensors, and attached to the external camera when you launch the tool.
  2. Select your camera from the dropdown list of available cameras.
  3. Enter a name for the camera configuration. You'll use this to later identify this configuration.
  4. Enter the camera's resolution. This information is available from the camera manufacturer.
  5. (Optional) Adjust the camera image settings.
  6. Select the prompt to Start Intrinsic Calibration. Align your checkerboard printout with the box placed on the screen, fit the pattern to the on-screen box by adjusting the distance of the pattern from the camera. The on-screen image shows rainbow coloring when the CameraTool recognizes the pattern. The CameraTool will automatically capture the information required when you hold the pattern still in the prompted location. Once complete, the calibration tool will use those images to remove any camera distortion. You’ll receive a reprojection error value indicating the quality of the configuration. Values <1 are acceptable, anything higher and we recommend that you run the calibration again.
    Note: You may notice pincushioning around the edges of the camera output after this step, this is normal and the result of distortion removal.
  7. Choose your tracked object (either a Touch controller or a VR Object), or select that this will be a Static Camera. If using a VR Object, you need to complete the process of updating the firmware before running the CameraTool.
  8. Position your Rift in the boxes that appear on the screen. If you have not done so already, you'll need to cover the proximity sensor on the Rift. You’ll need to adjust the distance of the headset from the camera to get the image of the Rift the same size as the box on the screen. It is important in this step to align the front face of the Rift as precisely as possible in the rectangles on the screen. When you’ve lined up the image of the Rift in the on-screen box, press the X or A button on a Touch controller.
  9. Finally, virtual controllers will be overlaid on your Touch controllers to demonstrate the result of your calibration. You may use sliders provided in the CameraTool to adjust the configuration if you wish. You’ll want to make sure the controllers are completely still for this step. The camera latency can be adjusted to account for any lag introduced from the time required to process, then render, the on-screen image.

Once you’ve completed the calibration, you can save the configuration to the system or a file. Saving to the system will use this calibration as long as the Oculus desktop app is running. Saving to a file will allow you to reload this configuration at any time in the future. To reload a configuration, launch the CameraTool and select Load Camera File. Exit the CameraTool when you're finished saving the files.

Troubleshoot Your Camera Calibration

Sometimes things don't work as expected after the camera calibration process. This section will help you through some of the common issues experienced during the calibration process.

  1. My camera is lagging or jittery.
    1. Check to see how you have your sensors and external camera configured in the USB ports. These are all high-bandwidth devices and can overload a chipset. Review how your devices are distributed in the Windows Device Manager and rearrange if necessary.
    2. Using a USB 3.0 camera with a USB 2.0 extension cable, or a USB 3.0 extension cable over 10 feet, may introduce camera lag.
    3. Finally, if the previous two steps did not resolve the issues with lag, consider using the USB expansion card listed on the System Configurations page.
  2. I've completed the camera calibration process, but when I move my VR Object and webcam the Touch controllers aren't aligned properly with their virtual representation. Please review step 2 in the Before You Begin section above. Make sure your sensors can see the ring around the Touch controller you're using as the VR object throughout the entire process.
  3. I keep getting a high score (>1) for my camera calibration. During the process, make sure that you fit the entire checkerboard pattern into the rectangle. Changing the rotation of the image as well as changing the angle of the checkerboard slightly with each image.
  4. The CameraTool is detecting my camera but showing a black screen in the preview window. Make sure that another application isn't trying to use the webcam. The CameraTool needs to be the primary user of the webcam during calibration.
  5. My camera position changed in relation to the VR Object. If the camera moves with respect to the VR Object, you can re-run the extrinsic portion of the calibration (step 7 above) after loading a camera save file with the intrinsic save measurements.