Documentation.MultipleKinect History
Hide minor edits - Show changes to markup
./calibrate-multiple-kinects grab0 grab1 calibration1.yml calibration2.yml —pattern-size 0.025
./calibrate-multiple-kinects grab0 grab1 calibration-SERIAL1.yml calibration-SERIAL2.yml —pattern-size 0.025
grab0 and grab1 are the directories containing the grabbed checkboards. grab0 correspond to the reference camera, and grab1 to the Kinect whose extrinsics will be computed. calibration1.yml and calibration2.yml are the calibration files containing the intrinsics of each Kinect. These can be obtained automatically from OpenNI by using File/Save Calibration Parameters in rgbd-multikinect after activating the corresponding device. These files are usually identical though.  —pattern-size is the same as in the calibration section. If calibration is successful, a calibration_multikinect.yml file will be generated, containing the computed R_extrinsics and T_extrinsics matrices, respectively the 3D rotation matrix and the 3D translation vector of the second camera w.r.t. the first one.
This file can then be fed to rgbd-multikinect:
./rgbd-multikinect --calibration2 calibration_multikinect.yml --numdevices 2
grab0 and grab1 are the directories containing the grabbed checkboards. grab0 correspond to the reference camera, and grab1 to the Kinect whose extrinsics will be computed. calibration-SERIAL1.yml and calibration-SERIAL2.yml are the calibration files containing the intrinsics of each Kinect (see above to obtain them).  —pattern-size is the same as in the calibration section. If calibration is successful, a calibration_multikinect.yml file will be generated, containing the computed R_extrinsics and T_extrinsics matrices, respectively the 3D rotation matrix and the 3D translation vector of the second camera w.r.t. the first one.
This file can then be fed to rgbd-multikinect by overwriting calibration-SERIAL2.yml with the generated file.
- Launch 
rgbd-multikinect. You need to plug each Kinect on a different usb hub. You can set the number of connected devices with the—numdevicesflag. Then you can switch between different devices using the number keys, or theDevicesmenu. A calibration file can be set for each device using e.g.—calibration2 calibration2.ymlto set the parameters of the second device. To calibrate the extrinsics of each Kinect, you can: 
- Launch 
rgbd-multikinect. You need to plug each Kinect on a different usb hub. You can set the number of connected devices with the—numdevicesflag. Then you can switch between different devices using the number keys, or theDevicesmenu. - A calibration file can be set for each device using e.g. 
—calibration calibration_dirto set the directory where the calibration files are located. The file should be namedcalibration-SERIAL.ymlwhere SERIAL is the serial number of the corresponding camera. It is recommended to initialize these files first by running the program and using “File/Save calibration parameters” to create default files. 
To calibrate the extrinsics of each Kinect, you can:
- Put a checkerboard in front of the camera. If it can be seen from all the cameras, then simply click on “Refine with checkboard” to estimate the extrinsics.
 
Using multiple kinects
- Launch 
rgbd-multikinect. You need to plug each Kinect on a different usb hub. You can set the number of connected devices with the—numdevicesflag. Then you can switch between different devices using the number keys, or theDevicesmenu. A calibration file can be set for each device using e.g.—calibration2 calibration2.ymlto set the parameters of the second device. To calibrate the extrinsics of each Kinect, you can: 
- Use the 3D view and check calibration mode to manually move the current view until it matches the reference one.
 - Once you’re close to a good alignment, the “Refine with ICP” button can help to finalize the registration.
 - Another option is to use the 
calibrate-multiple-kinectsprogram. You will first need to grab images of checkerboards seen by both cameras using uncalibratedrgbd-multikinect. Then you can call the calibration program with, e.g.: 
./calibrate-multiple-kinects grab0 grab1 calibration1.yml calibration2.yml --pattern-size 0.025
grab0 and grab1 are the directories containing the grabbed checkboards. grab0 correspond to the reference camera, and grab1 to the Kinect whose extrinsics will be computed. calibration1.yml and calibration2.yml are the calibration files containing the intrinsics of each Kinect. These can be obtained automatically from OpenNI by using File/Save Calibration Parameters in rgbd-multikinect after activating the corresponding device. These files are usually identical though.  —pattern-size is the same as in the calibration section. If calibration is successful, a calibration_multikinect.yml file will be generated, containing the computed R_extrinsics and T_extrinsics matrices, respectively the 3D rotation matrix and the 3D translation vector of the second camera w.r.t. the first one.
This file can then be fed to rgbd-multikinect:
./rgbd-multikinect --calibration2 calibration_multikinect.yml --numdevices 2
- Note: PCL support is required by this demo.
 

