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.
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.
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:
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:
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
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.
In this section we outline common mistakes and problems that can occur when calibrating.
Problem - I am not getting good results when calibrating.
Solutions:
MinCalibrationPoses
parameter (default 40) - Use around 40-80 as this increases accuracy of calibration.CalibrationScoreThreshold
parameter (default 200) - Use around 50-200 to set the verification thresholds.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.
Failure may occur because any of the following reasons:
If you are having persistent issues calibrating you should try the following:
When using the pattern make sure to follow these guidelines:
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 }; };