Calibration tool

HemiStereo 3D sensors are factory calibrated and should provide high quality 3D data out of the box. Nevertheless, it can happen, that the calibration gets lost due to mechanical impact which results in bad quality of the 3D data. In such a case, this tool can be used to recalibrate the sensor for improving the quality.

Installation

Note

Please ensure that you update the sensor before proceeding with the installation.

The calibration tool can be installed on the sensor using apt:

sudo apt update
sudo apt install 3dvl-calibration-tool

The calibration tool requires exclusive access to the camera devices. Therefore, apps using the camera (e.g. the stereo-backend) must be stopped first:

sudo hemistereo_app_stop stereo-backend

After stopping the apps, the calibration tool can be started:

sudo hemistereo_app_start calibration-tool

Usage

The calibration tool provides a web UI which can be accessed using the following URL:

http://<SENSOR-IP>/calibration-tool

Preparing the calibration target

A special calibration target is necessary to calibrate the camera. The UI provides a link to download it. Please print it without any scaling. You can check it using a ruler. One square must have exactly the size 17x17mm. If everything looks correct, put it on a flat surface. We suggest also to fix it with some tape to make sure that the target is flat.

Please click on Next to go to the next step.

Capturing images

On the second page you should see the two live images of the cameras. Hold the camera above the calibration target. When the target is detected, the checkerboard corners are drawn in the the image. If it is not detected make sure that the target is fully visible in both images, no cables are occluding the target and the light conditions are good. To capture images, repeat the following procedure:

  1. Move the camera to a position where the calibration target is visible in both images.

  2. Make sure that the target is detected and hold this position until the area gets marked red indicating that an image has been captured.

  3. Repeat this procedure until a large part of the image is marked red and the progressbars below both images are filled. When enough images are taken the marked area will turn green It should look like the images below.

../../_images/capture_progress.png
../../_images/capture_done.png

Note

If you do not see the live images, it could be that the backend is not fully started yet. Please wait some seconds, refresh the page and try it again.

Calibration

After clicking on Next, the calibration process will start. Depending on the images this can take some time. At the end a message will be displayed if the calibration was successful. If yes, than the new calibration is saved and you can check the result using the stereo application. If the calibration was not successful, you should try it one more time and contact us when it failed again.

Checking the result

To check the calibration, the stereo application must be activated again:

# stop the calibration tool
sudo hemistereo_app_stop calibration-tool
# start the stereo-backend
sudo hemistereo_app_run stereo-backend

The new calibration will be automatically used. You can use the HemiStereo Viewer to check the distance map. The 3D quality should have improved as shown in the image below.

../../_images/result.jpg

Restoring the factory calibration

In case you want to restore the factory calibration, use the following commands (internet connection required):

sudo rm -r /var/lib/hemistereo/data/calib/*
sudo hemistereo_calib_updater