Workflow for single-view camera calibration🔗
Preparing the calibration input data for a single-view setup🔗
Before calling a calibration operator (for example, calibrate_cameras), you must create and adapt the calibration data model with the following steps:
-
Create a calibration data model with the operator
create_calib_data, specifying the number of cameras in the setup and the number of used calibration objects. -
Specify the camera type and the initial internal camera parameters with the operator
set_calib_data_cam_param. -
Specify the description of all calibration objects with the operator
set_calib_data_calib_object. -
Collect observation data with the operators
find_calib_objectorset_calib_data_observ_points. This means, obtain the image coordinates of the extracted calibration marks of the calibration object and a roughly estimated pose of the calibration object relative to the observing camera. -
Configure the calibration process, for example, exclude certain camera parameters from the optimization. You can specify these parameters with the operator
set_calib_data. For example, if the image sensor cell size of camera 0 is known precisely and only the rest of the parameters needs to be calibrated, you callset_calib_data(CalibDataID, 'camera', 0, 'excluded_settings', ['sx','sy'])
Performing the actual camera calibration and obtaining its results🔗
Using all the information stored within the calibration data model, the actual calibration can be performed by calling calibrate_cameras.
Thereby, the input model is modified by optimizing the initial internal camera parameters, computing and adding further data like the external camera parameters or standard deviations.
Furthermore, the standard deviations and covariances of the calibrated internal parameters and the root mean square error of the back projection are calculated to check the success of the calibration.
The results can then be queried with the operator get_calib_data.
Checking the success of the calibration🔗
After a successful calibration, the root mean square error (RMSE) of the back projection of the optimization is returned in Error (in pixels).
The error gives a general indication whether the optimization was successful as it corresponds to the average distance (in pixels) between the back projected calibration points and their extracted image coordinates.
If only a single camera is calibrated, an Error in the order of 0.1 pixel (the typical detection error by extraction of the coordinates of the projected calibration markers) is an indication that the optimization fits the observation data well.
If Error strongly differs from 0.1 pixels, the calibration did not perform well.
Reasons for this might be, for example, a poor image quality, an insufficient number of calibration images, or an inaccurate calibration plate.
More Info
For information about how to check the success of the calibration using a multi-view camera setup, see Multi-view calibration.