DUO Calibration



Overview


In this article we review how to use our Calibration Utility to capture calibration frames, perform calibration and save the results to the device. Below we go through the steps of getting a proper calibration and testing. A proper calibration is critical stereo vision algorithms, make sure to follow the steps below to assure you get best results. Also make sure you have the latest DUO Software from our downloads page.

Prerequisites


  • This guide assumes you are using the latest DUO Platform (1.0.0.148) on Windows or Linux Platforms.
  • For instructions on using older versions of calibration follow our archived Calibration App guide.

Calibration Pattern


  • DUO Calibration Circles - A standard pattern for use in the calibration process can be downloaded here as PDF.

Step 1 - Not Calibrated


By default your DUO device should be calibrated from the factory. We recommend using this default however if it is required to re-calibrate then you can do so using our Calibration Utility (DUOCalibration.exe). When you first start the application you should see an un-calibrated scene. If you wish you clear the default calibration then you may do so using the File Menu > Calibration > Erase Calibration action.

To begin calibration click the Start Calibration button on the lower right hand of the application. It is good to have the calibration pattern properly illuminated in the scene before starting. Once you start the application will begin capturing frames for use in calibration.



Step 2 - Start Calibration


In this step we will capture the pattern from across multiple frames for use in calculating the intrinsic and extrinsic calibration data. This data is used to align the imaging sensors for use in the Dense3D middleware, OpenCV and other applications supporting the format. The capturing phase will end when 40 frames are captured properly. Once complete it will automatically move on to the next step. Below are some tips and guidelines to follow when calibrating.

Calibration Guidelines:

  • Make sure your calibration pattern is well illuminated and attached to a rigid surface
  • Hold the board 1.5-2.0 feet away from the camera sensor
  • The output will only show captures when a valid pattern is recognized
  • Make sure your lenses are clean of any dust/smudges and the scene is in focus
  • Move slowly in a spiral motion pointing the center of the board towards camera


Step 3 - Processing


After capturing of the frames we must process them to calculate the related data. This process can take several minutes and will enable the Close button upon completion. In the output text you will see several key variables which can be used to verify your results.

Some of the key values to look for are:

  • Estimated reprojection error
  • Final intrinsics and extrinsics
  • Final reprojection error
  • Distortion and Projection parameters


Step 4 - Results


Once the calibration data has been processed the application will update to showcase the results. By enabling the Undistort option you can view the result image from both sensors. By enabled the Show Grid option you can use to check if the camera scene aligns properly. Also with the 3D viewer you can visually see the resulting calibration results.

Upon successful calibration you will be able to write the calibration results to the device. The calibration can be written by clicking the Write Calibration button or by using the File Menu > Calibration > Write Calibration action. It is important to restart the application after a new calibration has been written.

Options

  • Flip/Swap - Set to default values and disabled to prevent changes.
  • Undistort - Enables or disables the undistortion of the camera images.
  • Show Grid - Enables or disables the drawing of epipole lines to verify alignment.


Step 5 - Confirmation


By expanding the 3D viewer section you can more closely inspect the respective transforms for each camera. This is helpful as you can see potential errors which you can see in the next step. You can use your mouse to zoom in, translate and rotate the scene for analysis.

  • Inner/Outer FOV - Field of view with units in degrees.
  • Position/Rotation - Translation and rotation matrices with units in mm.


Troubleshooting


In this section we outline common mistakes and problems that can occur when calibrating.


Problem - I am not getting good results when calibrating.

Solutions:

  • Verify that the printed calibration pattern used follows same aspect ratio as recommended.
  • Make sure your lenses are clean and the calibration grid is clearly visible within the camera's field of view.
  • It is best to get a wide range of variance when calibrating, so capture frames from a wide range of perspectives.
  • Increase the MinCalibrationPoses parameter (default 40) - Use around 40-80 as this increases accuracy of calibration.
  • Decrease the CalibrationScoreThreshold parameter (default 200) - Use around 50-200 to set the verification thresholds.

Calibration Errors


Here is an example of improper calibration data, note the jagged edges on the blue (FOV) lines. It is recommended to use the Show Grid option to compare that pixels fall on the same line. In the next sections we show a properly calibration output and values ranges to compare with your own results.



Calibration Failed


Failure may occur because any of the following reasons:

  • The field of view (FOV) values are negative or out of bounds
  • The calibration score is below the threshold (CalibrationScoreThreshold)

If you are having persistent issues calibrating you should try the following:

  • Increase the MinCalibrationPoses value (default 40)
  • Lower the CalibrationScoreThreshold (default 200)
  • Make sure to follow the Calibration Guidelines in Step 2


Calibration Pattern


When using the pattern make sure to follow these guidelines:

  • The pattern should be applied to a flat rigid plane so it does not deform/warp
  • Printed with no scaling on standard A4 paper size with "Fit to page" disabled
  • Make sure the CalibrationSquareSize in config file matches the printed pattern as shown here:


Calibration Settings


If needed you can edit the calibration config file CalibrationSettings.cfg to change values. Before editing close DUO calibration utility. Any configuration update will require an application restart to reload the settings properly.


Config : 
{
  Duo : 
  {
    Gain = 0;
    Exposure = 100;
    Led = 0;
    Flip = 0;
    Swap = false;
    Undistort = true;
  };
  Calibration : 
  {
    CalibrationBoardSize = [ 4, 11 ];        // The number of circles in grid
    CalibrationSquareSize = 16.4;            // The distance between the circles in mm
    ShowGrid = true;                         // Show alignment lines (epipoles)
    PoseGrabDelay = 200;                     // The delay of capture in milliseconds
    MinCalibrationPoses = 40;                // The amount of frames captured by default
    CalibrationScoreThreshold = 200;         // The total calibration score needed to pass 
  };
};


Resources


Related


How can we help?  

Was this helpful? 0



Home -  Company -  Products -  Solutions -  Showcase -  Support -  Contact © Copyright 2018 – DUO3D™ Code Laboratories, Inc.