Range Imaging and Calibration using C3D software

At this stage of the project the ROS system is using the C3D software for producing range images and calibrate the camera equipment of the robot head. C3D has been integrated into ROS as a single package RH_C3D that contains two main nodes RHstereomatcher and RHcalibration, that undertake range imaging and calibration respectively. These two nodes must be run on the same computer. Also under linux the permission have to be set on the JAR files to allow for execution. The JAR files are to be found in the C3D subfolders of the RH_C3D package.


The RHstereomatcher node uses the stereo-pair images released by the RHcam_left and RHcam_right nodes. For every RGB image pair a stereo-pair of green channel images is extracted by the RHstereomatcher node, and passed as input data to the C3D matcher (C3D_JustMatched.jar). C3D outputs horizontal and vertical disparity maps and a range image for each stereo-pair input, which are then released by the RHstereomatcher node to the ROS system to be used in other nodes. The RHstereomatcher node requires for the range iamging process the calibration files, lefcal.tcl and rigcal.tcl, of the cameras that can be obtained by using the RHcalibration node.


For calibrating the cameras the RHcalibration node will save locally per default 20 calibration image pairs from RHcam_left and RHcam_right nodes in TIFF format and then invoke C3D. The images are stored in the RH_C3D subdirector C3D/Calibration.c3d/data.c3d and will be erased once the operator has confirmed to have completed the calibration. If the operator would like to work with less or more calibration images, the node can be started with passing the number of calibration images to be used as a parameter on the command line. NOTE: no less then 10 images should be used.

  • rosrun RH_C3D RHcalibration numberOfCalibrationImages

Once C3D has been invoked the operator has then to open a new session in C3D on the directory containing the calibration images (data.c3d). The session starts by loading the calibration images from TIFF into HIPS format. The operator has then to access the C3D settings from the Tools menu and set values for two parameters in the calibration tab, “Force Target” to “true” and select “planeDomino2 53” from the bar code drop down menu, before starting the calibration process from the “Tool” menu. After the calibration process finishes a message appears saying that the cameras have not been initialised. The calibration images should be visualised in C3D to verify if all the circles of the calibration targets have been correctly detected and identified in the left image as well as in the right image for each pair. If in a single stereo-pair of calibration images the circle finder detects and labels less than 13 of the 14 circles in either image of the input pair (for circle enumeration, from -2 to 11), then this pair should be excluded from the calibration process. In case images have to be excluded, close C3D and via the command terminal the option to exclude specified image pairs will then be offered to the user. After having excluded faulty image pairs, C3D will restart. The operator is then required to reload the session and has to change the “Force Target” setting to “false” before starting the calibration from the “Tool” menu. When the calibration process has finished for the second time C3D has to be closed and, via the command terminal, it must be confirmed that the calibration has ended. The node will then copy the calibration files over to the location required for the RHstereomatcher.

Note: the C3D calibration target should be printed without any scaling and reformatting; otherwise, camera calibration and, consequently, range imaging will fail

CircleEnumerisation.png (93.3 KB) Gerardo Aragon, 07/03/2013 12:01

Domino53.svg - C3D calibration target (original file) (18.3 KB) Gerardo Aragon, 07/03/2013 12:10

Print Vector Domino53.pdf - C3D calibration target (5.55 KB) Gerardo Aragon, 07/03/2013 12:10