#include <Calibration.h>
Provides functions for calibrating multi-sensor setups.
More...
Provides functions for calibrating multi-sensor setups.
To calibrate a multi-sensor setup a calibration marker needs to be placed in such a way that it is visible in all sensors which are to be calibrated. For each sensor a color image needs to be acquired. The calibration object needs to be initialized with the number of sensors to calibrate by calling the init method. Next the markers used for calibration have to be specified using setMarker. It is possible to specify more than one marker. In this case the transformation from each marker coordinate system to a common calibration coordinate system needs to be provided. Next the calibration images need to be set using setImage. At this point calibrate can be called to calibrate the sensor locations. The results can be retrieved using getTransformation. The returned transformation provides the transformation from the specified sensor coordinate system to the coordinate system of the first sensor. It is represented as homogeneous 4x4 matrix with the upper left 3x3 matrix representig the rotation component and the upper right 3x1 vector representing the translation component. The matrix can be passed directly to the sensorT parameter of Reconstruction::addFrame method.
◆ init()
Set up calibration.
- Parameters
-
sensors | Nubmer of sensors to calibrate |
- Returns
- True if successful, false otherwise
Needs to be called before any other functions can be called. Clears previously set markers and images.
◆ setMarker()
void setMarker |
( |
int |
markerId, |
|
|
double |
markerSize, |
|
|
const Mat4 * |
markerT = 0 |
|
) |
| |
Define marker with given ID.
- Parameters
-
markerId | ID of the marker |
markerSize | Side length of the marker in mm |
markerT | Optional transformation from the marker coordinate system to the calibration object coordinate system. |
- Returns
- False if invalid sensor index was provided, true otherwise
Overwrittes previously defined markers with the same ID.
◆ setImage()
bool setImage |
( |
int |
sensor, |
|
|
const DepthImage & |
imgDepth, |
|
|
const ColorImage & |
imgColor, |
|
|
const Mat3 & |
depthK, |
|
|
const Mat3 & |
colorK, |
|
|
const Mat4 * |
depthToColorT = 0 |
|
) |
| |
Set image for given sensor.
- Parameters
-
sensor | Sensor index |
imgDepth | Depth image from sensor corresponding to color image showing calibration target |
imgColor | Color image from sensor showing calibration target |
depthK | Intrinsics of depth sensor |
colorK | Intrinsics of color sensor (typically identical to depth intrinsics) |
depthToColorT | Transformation from depth to color |
- Returns
- False if invalid sensor index was provide, true otherwise
If the image has been previously set it is overwritten
◆ calibrate()
Perform calibration using the previously set markers and images.
- Returns
- True if the marker was detected in all images and calibration succeeded, false otherwise
Before calling this method the marker(s) and the images have to be specified using setMarker and setImage
◆ getTransformation()
bool getTransformation |
( |
int |
sensor, |
|
|
Mat4 & |
T |
|
) |
| |
Get transformation from specified sensor to first sensor.
- Parameters
-
sensor | Sensor index for which to retrieve transformation |
T | Transformation from specified to first sensor |
- Returns
- True if transformation is available, false otherwise
◆ getMarkerPose()
static bool getMarkerPose |
( |
int |
markerId, |
|
|
double |
markerSize, |
|
|
const ColorImage & |
imgColor, |
|
|
const Mat3 & |
colorK, |
|
|
Mat4 & |
T |
|
) |
| |
|
static |
Get transformation from specified marker to sensor.
- Parameters
-
markerId | ID of the marker |
markerSize | Side length of the marker in mm |
imgColor | Color image from sensor showing calibration target |
colorK | Intrinsics of color sensor (typically identical to depth intrinsics) |
T | Transformation from marker coordinate system to sensor |
- Returns
- True if transformation is available, false otherwise
The documentation for this class was generated from the following file:
- E:/BuildAgent/work/97cc5eac790048b1/RecFusionSDK/include/Calibration.h