ReconstructMe SDK
2.6.43-0
Real-time 3D reconstruction engine
|
Provides intrinsic camera calibration. More...
Provides intrinsic camera calibration.
This modules provides methods to estimate the intrinsic sensor parameters. The basic workflow to calibrate your sensor and use the estimate values to correct distortion is
Note that various sensors support different video streams (depth, color, ir). The calibration module performs an intrinsic calibration of one of them. Since release 2.0 by default the alignment of depth and color streams is set to true. This means, that when you want to calibrate the depth, you should actually calibrate color as all depth values will be mapped internally to this video-stream.
The example below illustrates calibrating a real-world sensor
typedef int reme_calibrator_t |
Handle referencing a calibrator.
Calibration determines a sensors' intrinsic parameters. Besides the focal length and principal point, also the radial and tangential distortion parameters are calculated. For this to work one has to specify a set of images of a known calibration target. Currently the common chessboard target is supported.
reme_error_t reme_calibrator_create | ( | reme_context_t | c, |
reme_calibrator_t * | cb | ||
) |
Create a new calibration object.
c | A valid context object |
cb | A pointer that will receive the handle of the created calibration object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_destroy | ( | reme_context_t | c, |
reme_calibrator_t * | cb | ||
) |
Destroy a previously created calibrator object.
c | A pointer to a valid context object |
cb | A mutable pointer to a valid calibrator handle to destroy |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_bind_options | ( | reme_context_t | c, |
reme_calibrator_t | cb, | ||
reme_options_t | o | ||
) |
Access the calibration options.
The calibration options are applied when the first image is added (reme_calibrator_add_image).
c | A valid context object |
cb | A valid calibration object |
o | A valid options binding object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_add_image | ( | reme_context_t | c, |
reme_calibrator_t | cb, | ||
reme_image_t | i | ||
) |
Add a new image of the calibration target.
To receive the best results
c | A valid context object |
cb | A valid calibration object |
i | A valid image object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_NO_CALIBRATION_TARGET | When the calibration target was not found in the image supplied. |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_get_detection_image | ( | reme_context_t | c, |
reme_calibrator_t | cb, | ||
reme_image_t | i | ||
) |
Receives the result image of the last image added.
c | A valid context object |
cb | A valid calibration object |
i | A valid image object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_calibrate | ( | reme_context_t | c, |
reme_calibrator_t | cb, | ||
float * | reprojection_error = 0 |
||
) |
Calibrate using the images added before.
The result of a successful calibration is are new intrinsic settings. Use
c | A valid context object |
cb | A valid calibration object |
reprojection_error | If not null, the reprojection error of the calibration. |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_calibrator_bind_intrinsics | ( | reme_context_t | c, |
reme_calibrator_t | cb, | ||
reme_options_t | o | ||
) |
Access the calibration results.
The results are provided as a new intrincis options set.
c | A valid context object |
cb | A valid calibration object |
o | A valid options binding object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |