Please note that it is not included in Python and Java versions of OpenRTM-aist. On Linux, build and install it according to OpenCV sample code for Linux.


RT component sample with GUI screen. The sample component starts by executing TkCalibGUI.bat. GUI for ImageCalibration component that performs camera calibration.

When this component is executed and a camera component is specified from the selectable list, it is automatically started together with ImageCalibrationComp, and the port connection between the components is also performed automatically. You can save camera images required for calibration and calculate camera parameters by operating the buttons on the GUI.

Component execution conditions

If installed using the OpenRTM-aist C ++ installer for Windows, it only needs to be executed by running TkCalibGUI.bat.

If you build from source, you need to arrange the execution conditions. This component checks the environment required for execution. If the conditions are not met, the following message dialog will be displayed. Follow the instructions to install.

Message displayed when execution conditions are not met

For Windows environment

Message contents Correspondence processing
OpenRTM-aist Python is not installed. OpenRTM-aist Python version You can download it.
Please match the OS version (32bit or 64bit) of the installer with the OpenRTM-aist C ++ version.
Ttk is not installed. Please install pyttk. It is included in python2.7, but needs to be installed separately in python2.6.
PIL is not installed. Please install PIL.
NumPy is not installed. Please install numpy.
rtctree is not installed. Requires rtctree-3.0.1 or higher
The installer will be released soon, but until then, github page Click "Download Zip", download and extract the file, and execute to install. (> Python install) Add the path to site-packages\rtctree\rtmidl to the system environment variable PYTHONPATH.
eg) C:\Python27\Lib\site-packages\rtctree\rtmidl

For Linux (Ubuntu) environment

Message contents Required processing
OpenRTM-aist Python is not installed. Execute Bulk installation script with -l python option.
Ttk is not installed. $ Sudo apt-get install python-tk
PIL is not installed. $ Sudo apt-get install python-pil.imagetk
NumPy is not installed. $ Sudo apt-get install python-numpy
rtctree is not installed. Requires rtctree-3.0.1 or higher
Download from github and run to install. Add PYTHONPATH to ~/.bashrc or other way.
export PYTHONPATH = "/usr/local/lib/python2.7/dist-packages/rtctree/rtmidl"

Start screen


At first, select the camera component to use from the list. This list shows the camera component names that can be used in the current environment. The selection can be done by the input-box at the right top side of the dialog. OpenCVCameraComp and MFCameraComp can be selected in the environment of VC2019 of Windows 10. Both of them work in the same way, but OpenCVCameraCompp seems to be newer and less dependent on the environment. The ImageCalibration component is started by the execution file started by tkCalibGUI.bat. This component can be started alone by ImageCalibration.bat, but we did not provide stand-alone components to connect to the ImageCalibration component in the release. If you want to use the ImageCalibration component without using tkCalibGUI you may need to create the component which can be connected to ImageCalibration component by yourself.


Click the [All Activate] button to display the camera image. The connection status of all components at this time is as shown below. Components other than TkCalibGUI are started automatically, and components are also connected automatically.


How to use

Prepare a checker pattern (calibration pattern). For your reference, we use checkerboard.pdf here. The number of corners of the checker pattern must be specified in the ImageCalibration Configuration. The number of shared vertices of the vertical and horizontal white and black squares of the pattern (checker_h, checker_w) - this is the number of black and white squares-1, and the number of shots (image_num) can also be changed in Configuration.

To capture checker patterns, save (by click [保存] button) the specified number of patterns at various angles to cover the entire screen as much as possible. Click the [確認] button to check the saved image. Clicking the [取り消し] button deletes the image, so please save it again.

calib3.jpg calib4.jpg
calib5.jpg calib6.jpg

After saving the specified number of sheets, the [結果表示] button is enabled. Click this to display the camera parameter values.


The camera parameters are output to the same directory as the component executable file with the file name camera.yml.

  calibration_time: "Thu May 22 16:38:06 2014\n"
  image_width: 640
  image_height: 480
  board_width: 13
  board_height: 9
  cameraMatrix: !!opencv-matrix
     rows: 3
     cols: 3
     dt: d
     data: [ 5.8272934483011682e+002, 0., 3.3703801084645710e+002, 0.,
         5.8023846162074653e+002, 2.2824562602176763e+002, 0., 0., 1. ]
  distCoeffs: !!opencv-matrix
     rows: 1
     cols: 5
     dt: d
     data: [ -1.4659954975042236e-001, 5.7825601645508595e-001,
         -3.3745642103035984e-003, 1.2569676956708463e-003,
         -9.8011775330916773e-001 ]

Image output (reference material)

For reference, when the [保存] button is clicked, the captured image file is output to the directory which is specified by the system environment variable TEMP or TMP.
  • Filename: capture0.jpg ~ capture4.jpg (5 images saved: grayscale image)
The above-captured images's distortion is corrected by using the camera parameter made by this calibration process and the corrected image is output to the same directory.
  • Filename: undistorted0.jpg ~ undistorted4.jpg (File numbers correspond to capture*.jpg)


latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects


Motion editor/Dynamics simulator


Dynamics simulator


Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST


Tokyo Opensource Robotics Association


Middleware for DAQ (Data Aquisition) by KEK