Name
set_calib_dataset_calib_dataSetCalibDataset_calib_dataSetCalibDataSetCalibData — Set data in a calibration data model.
void SetCalibData(const HTuple& CalibDataID, const HTuple& ItemType, const HTuple& ItemIdx, const HTuple& DataName, const HTuple& DataValue)
void HCalibData::SetCalibData(const HString& ItemType, const HTuple& ItemIdx, const HString& DataName, const HTuple& DataValue) const
void HCalibData::SetCalibData(const HString& ItemType, Hlong ItemIdx, const HString& DataName, const HString& DataValue) const
void HCalibData::SetCalibData(const char* ItemType, Hlong ItemIdx, const char* DataName, const char* DataValue) const
static void HOperatorSet.SetCalibData(HTuple calibDataID, HTuple itemType, HTuple itemIdx, HTuple dataName, HTuple dataValue)
void HCalibData.SetCalibData(string itemType, HTuple itemIdx, string dataName, HTuple dataValue)
void HCalibData.SetCalibData(string itemType, int itemIdx, string dataName, string dataValue)
With the operator set_calib_dataset_calib_dataSetCalibDataset_calib_dataSetCalibDataSetCalibData, you can set data in the
calibration data model CalibDataIDCalibDataIDCalibDataIDCalibDataIDCalibDataIDcalibDataID. Depending on the value
of ItemTypeItemTypeItemTypeItemTypeItemTypeitemType, the affected item is either the model, a camera,
a calibration object pose, or the hand-eye calibration data set.
The parameter ItemIdxItemIdxItemIdxItemIdxItemIdxitemIdx lets you select whether the new value should
be set for all items of a type or only for an individual one. The parameters
to set are passed in DataNameDataNameDataNameDataNameDataNamedataName, their values in DataValueDataValueDataValueDataValueDataValuedataValue.
Model-related data
For ItemTypeItemTypeItemTypeItemTypeItemTypeitemType='model'"model""model""model""model""model", only the value 'general'"general""general""general""general""general" is
allowed for ItemIdxItemIdxItemIdxItemIdxItemIdxitemIdx. Depending on the selection in
DataNameDataNameDataNameDataNameDataNamedataName, you can set the following model-related parameters
to the value passed in DataValueDataValueDataValueDataValueDataValuedataValue:
- 'reference_camera'"reference_camera""reference_camera""reference_camera""reference_camera""reference_camera":
Set the reference camera for the calibration model to the passed
camera index. All poses stored in the calibration data model are
specified in the coordinate system of the reference camera
(see get_calib_dataget_calib_dataGetCalibDataget_calib_dataGetCalibDataGetCalibData).
- 'optimization_method'"optimization_method""optimization_method""optimization_method""optimization_method""optimization_method":
Set the optimization method to be used in the hand-eye calibration
process. If DataValueDataValueDataValueDataValueDataValuedataValue='linear'"linear""linear""linear""linear""linear" is set, a linear method
is used for the hand-eye calibration. If
DataValueDataValueDataValueDataValueDataValuedataValue='nonlinear'"nonlinear""nonlinear""nonlinear""nonlinear""nonlinear" is set, a nonlinear method is
used for the hand-eye calibration
(see calibrate_hand_eyecalibrate_hand_eyeCalibrateHandEyecalibrate_hand_eyeCalibrateHandEyeCalibrateHandEye for more details).
Camera-related data
With ItemTypeItemTypeItemTypeItemTypeItemTypeitemType='camera'"camera""camera""camera""camera""camera", you can set calibration settings
data either for all cameras or for a specific camera.
With ItemIdxItemIdxItemIdxItemIdxItemIdxitemIdx='general'"general""general""general""general""general", the new settings are applied to all
cameras in the model. If you pass a valid camera index instead, i.e. a number
between 0 and NumCameras-1 (NumCameras is specified
during model creation with create_calib_datacreate_calib_dataCreateCalibDatacreate_calib_dataCreateCalibDataCreateCalibData), only the
specified camera is affected by the changes.
By selecting the following parameters in DataNameDataNameDataNameDataNameDataNamedataName, you can specify
which camera parameters shall be optimized during the
calibration performed by calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras:
- 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings""calib_settings":
The camera parameters listed in DataValueDataValueDataValueDataValueDataValuedataValue are marked for
optimization for the affected camera(s).
- 'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings""excluded_settings":
The camera parameters listed in DataValueDataValueDataValueDataValueDataValuedataValue are excluded from
the optimization for the affected camera(s).
The following camera parameters can be passed in DataValueDataValueDataValueDataValueDataValuedataValue:
Internal camera parameters
- 'focus'"focus""focus""focus""focus""focus":
Focal length.
- 'kappa'"kappa""kappa""kappa""kappa""kappa":
Divisional radial distortion coefficient kappa (for cameras
of type 'area_scan_division' and 'area_scan_telecentric_division'
only).
- 'k1'"k1""k1""k1""k1""k1",'k2'"k2""k2""k2""k2""k2",'k3'"k3""k3""k3""k3""k3":
Polynomial radial distortion parameters (for cameras of type
'area_scan_polynomial',
'area_scan_telecentric_polynomial' only).
- 'poly_rad_2'"poly_rad_2""poly_rad_2""poly_rad_2""poly_rad_2""poly_rad_2",'poly_rad_4'"poly_rad_4""poly_rad_4""poly_rad_4""poly_rad_4""poly_rad_4",
'poly_rad_6'"poly_rad_6""poly_rad_6""poly_rad_6""poly_rad_6""poly_rad_6":
Polynomial radial distortion coefficients as in
binocular_calibrationbinocular_calibrationBinocularCalibrationbinocular_calibrationBinocularCalibrationBinocularCalibration (for cameras
of type 'area_scan_polynomial' or 'area_scan_telecentric_polynomial'
only).
- 'poly_tan_2'"poly_tan_2""poly_tan_2""poly_tan_2""poly_tan_2""poly_tan_2":
An alias parameter for all polynomial tangential distortion
parameters, i.e. p1 and p2 (for cameras of type 'area_scan_polynomial',
'area_scan_telecentric_polynomial' only).
- 'poly'"poly""poly""poly""poly""poly":
An alias parameter for all polynomial distortion
parameters, i.e. k1, k2, k3, p1 and p2 (for cameras of type
'area_scan_polynomial',
'area_scan_telecentric_polynomial' only).
- 'cx'"cx""cx""cx""cx""cx",'cy'"cy""cy""cy""cy""cy":
Coordinates of the camera's principal point.
- 'principal_point'"principal_point""principal_point""principal_point""principal_point""principal_point":
An alias parameter for 'cx'"cx""cx""cx""cx""cx" and 'cy'"cy""cy""cy""cy""cy".
- 'sx'"sx""sx""sx""sx""sx",'sy'"sy""sy""sy""sy""sy":
Sensor cell dimensions.
- 'params'"params""params""params""params""params":
All internal camera parameters.
External camera parameters
- 'alpha'"alpha""alpha""alpha""alpha""alpha",'beta'"beta""beta""beta""beta""beta",'gamma'"gamma""gamma""gamma""gamma""gamma":
Rotation part of the camera pose.
- 'transx'"transx""transx""transx""transx""transx",'transy'"transy""transy""transy""transy""transy",'transz'"transz""transz""transz""transz""transz":
Translation part of the camera pose.
- 'pose'"pose""pose""pose""pose""pose":
All external camera parameters.
Further camera parameters
- 'vx'"vx""vx""vx""vx""vx",'vy'"vy""vy""vy""vy""vy",'vz'"vz""vz""vz""vz""vz":
Motion vector parameters (for cameras of type 'line_scan'
only).
- 'all'"all""all""all""all""all":
All camera parameters.
By default, all parameters are marked for calibration. As an exception,
the camera pose is excluded from the optimization for calibration setups
with only one camera (NumCameras=1). This setting makes the
calibration process equivalent to the one performed by
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration.
Data related to calibration object poses
With ItemTypeItemTypeItemTypeItemTypeItemTypeitemType='calib_obj_pose'"calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose", you can set calibration
settings data either for all calibration object poses, or for a
specific pose.
With ItemIdxItemIdxItemIdxItemIdxItemIdxitemIdx='general'"general""general""general""general""general" the new settings are applied to all
calibration object poses in the model. If you pass a valid calibration
object pose index instead, i.e. a tuple containing a valid index pair
[CalibObjIdx, CalibObjPoseIdx], you specify a calibration object
pose, which is affected by the changes.
By selecting the following parameters in DataNameDataNameDataNameDataNameDataNamedataName, you can specify
which calibration object pose parameters shall be optimized during the
calibration performed by calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras:
- 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings""calib_settings":
The calibration object pose settings listed in DataValueDataValueDataValueDataValueDataValuedataValue are
marked for optimization for the affected pose(s).
- 'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings""excluded_settings":
The calibration object pose settings listed in DataValueDataValueDataValueDataValueDataValuedataValue are
excluded from the optimization for the affected pose(s).
The following calibration pose parameters can be passed in
DataValueDataValueDataValueDataValueDataValuedataValue:
- 'alpha'"alpha""alpha""alpha""alpha""alpha",'beta'"beta""beta""beta""beta""beta",'gamma'"gamma""gamma""gamma""gamma""gamma":
Rotation part of the calibration object pose.
- 'transx'"transx""transx""transx""transx""transx",'transy'"transy""transy""transy""transy""transy",'transz'"transz""transz""transz""transz""transz":
Translation part of the calibration object pose.
- 'pose'"pose""pose""pose""pose""pose":
All calibration object pose parameters.
- 'all'"all""all""all""all""all":
All calibration objects optimization parameters,
i.e., the same as 'pose'"pose""pose""pose""pose""pose".
By default all parameters are marked for calibration.
The current settings for any model item can be queried with the operator
get_calib_dataget_calib_dataGetCalibDataget_calib_dataGetCalibDataGetCalibData.
Hand-eye calibration related data
With ItemTypeItemTypeItemTypeItemTypeItemTypeitemType='tool'"tool""tool""tool""tool""tool", you can set the pose of the robot
tool (in robot base coordinates), which was used to obtain the observation
of the pose of the calibration object with the same index ItemIdxItemIdxItemIdxItemIdxItemIdxitemIdx
(corresponds to the parameter CalibObjPoseIdx of any of the
operators find_calib_objectfind_calib_objectFindCalibObjectfind_calib_objectFindCalibObjectFindCalibObject, set_calib_data_observ_poseset_calib_data_observ_poseSetCalibDataObservPoseset_calib_data_observ_poseSetCalibDataObservPoseSetCalibDataObservPose,
or set_calib_data_observ_poseset_calib_data_observ_poseSetCalibDataObservPoseset_calib_data_observ_poseSetCalibDataObservPoseSetCalibDataObservPose).
By selecting DataNameDataNameDataNameDataNameDataNamedataName='tool_in_base_pose'"tool_in_base_pose""tool_in_base_pose""tool_in_base_pose""tool_in_base_pose""tool_in_base_pose",
you can specify the pose in DataValueDataValueDataValueDataValueDataValuedataValue.
A camera calibration data model CalibDataID cannot be shared
between two or more user's threads. Different camera calibration data
models can be used independently and safely in different threads.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Handle of a calibration data model.
Type of calibration data item.
Default value:
'model'
"model"
"model"
"model"
"model"
"model"
List of values: 'calib_obj_pose'"calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose", 'camera'"camera""camera""camera""camera""camera", 'model'"model""model""model""model""model", 'tool'"tool""tool""tool""tool""tool"
Index of the affected item
(depending on the selected ItemTypeItemTypeItemTypeItemTypeItemTypeitemType).
Default value:
'general'
"general"
"general"
"general"
"general"
"general"
Suggested values: 0, 1, 2, 'general'"general""general""general""general""general"
Parameter(s) to set.
Default value:
'reference_camera'
"reference_camera"
"reference_camera"
"reference_camera"
"reference_camera"
"reference_camera"
List of values: 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings""calib_settings", 'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings""excluded_settings", 'optimization_method'"optimization_method""optimization_method""optimization_method""optimization_method""optimization_method", 'reference_camera'"reference_camera""reference_camera""reference_camera""reference_camera""reference_camera", 'tool_in_base_pose'"tool_in_base_pose""tool_in_base_pose""tool_in_base_pose""tool_in_base_pose""tool_in_base_pose"
New value(s).
Default value: 0
Suggested values: 0, 1, 2, 'all'"all""all""all""all""all", 'pose'"pose""pose""pose""pose""pose", 'params'"params""params""params""params""params", 'alpha'"alpha""alpha""alpha""alpha""alpha", 'beta'"beta""beta""beta""beta""beta", 'gamma'"gamma""gamma""gamma""gamma""gamma", 'transx'"transx""transx""transx""transx""transx", 'transy'"transy""transy""transy""transy""transy", 'transz'"transz""transz""transz""transz""transz", 'focus'"focus""focus""focus""focus""focus", 'kappa'"kappa""kappa""kappa""kappa""kappa", 'poly'"poly""poly""poly""poly""poly", 'poly_rad_2'"poly_rad_2""poly_rad_2""poly_rad_2""poly_rad_2""poly_rad_2", 'poly_rad_4'"poly_rad_4""poly_rad_4""poly_rad_4""poly_rad_4""poly_rad_4", 'poly_rad_6'"poly_rad_6""poly_rad_6""poly_rad_6""poly_rad_6""poly_rad_6", 'k1'"k1""k1""k1""k1""k1", 'k2'"k2""k2""k2""k2""k2", 'k3'"k3""k3""k3""k3""k3", 'poly_tan_2'"poly_tan_2""poly_tan_2""poly_tan_2""poly_tan_2""poly_tan_2", 'principal_point'"principal_point""principal_point""principal_point""principal_point""principal_point", 'cx'"cx""cx""cx""cx""cx", 'cy'"cy""cy""cy""cy""cy", 'sx'"sx""sx""sx""sx""sx", 'sy'"sy""sy""sy""sy""sy", 'vx'"vx""vx""vx""vx""vx", 'vy'"vy""vy""vy""vy""vy", 'vz'"vz""vz""vz""vz""vz", 'linear'"linear""linear""linear""linear""linear", 'nonlinear'"nonlinear""nonlinear""nonlinear""nonlinear""nonlinear"
* Here, the cell size is known exactly, thus it is excluded from
* the optimization.
set_calib_data (CalibDataID, 'camera', 'general', 'excluded_settings', \
['sx','sy'])
set_calib_data_observ_pointsset_calib_data_observ_pointsSetCalibDataObservPointsset_calib_data_observ_pointsSetCalibDataObservPointsSetCalibDataObservPoints,
find_calib_objectfind_calib_objectFindCalibObjectfind_calib_objectFindCalibObjectFindCalibObject
calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras,
calibrate_hand_eyecalibrate_hand_eyeCalibrateHandEyecalibrate_hand_eyeCalibrateHandEyeCalibrateHandEye
Calibration