ClassesClasses | | Operators

set_calib_dataT_set_calib_dataSetCalibDataSetCalibData (Operator)

Name

set_calib_dataT_set_calib_dataSetCalibDataSetCalibData — Set data in a calibration data model.

Signature

set_calib_data( : : CalibDataID, ItemType, ItemIdx, DataName, DataValue : )

Herror T_set_calib_data(const Htuple CalibDataID, const Htuple ItemType, const Htuple ItemIdx, const Htuple DataName, const Htuple DataValue)

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)

Description

With the operator set_calib_dataset_calib_dataSetCalibDataSetCalibDataSetCalibData, you can set data in the calibration data model CalibDataIDCalibDataIDCalibDataIDCalibDataIDcalibDataID.

Note that an overview on how the calibration data model is filled with data during the processes of camera calibration and hand-eye calibration is provided by the description of get_calib_dataget_calib_dataGetCalibDataGetCalibDataGetCalibData.

The calibration data model can contain various kinds of data. How to set specific data in the calibration data model is described for different categories of data:

The parameter ItemIdxItemIdxItemIdxItemIdxitemIdx 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 DataNameDataNameDataNameDataNamedataName, their values in DataValueDataValueDataValueDataValuedataValue.

Model-related data

ItemTypeItemTypeItemTypeItemTypeitemType='model'"model""model""model""model":

ItemIdxItemIdxItemIdxItemIdxitemIdx must be set to 'general'"general""general""general""general".

Depending on the selection in DataNameDataNameDataNameDataNamedataName, you can set the following model-related parameters to the value passed in DataValueDataValueDataValueDataValuedataValue:

'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_dataGetCalibDataGetCalibDataGetCalibData).

'optimization_method'"optimization_method""optimization_method""optimization_method""optimization_method":

Set the optimization method to be used in the hand-eye calibration process. If DataValueDataValueDataValueDataValuedataValue='linear'"linear""linear""linear""linear" is set, a linear method is used for the hand-eye calibration. If DataValueDataValueDataValueDataValuedataValue='nonlinear'"nonlinear""nonlinear""nonlinear""nonlinear" is set, a nonlinear method is used for the hand-eye calibration (see calibrate_hand_eyecalibrate_hand_eyeCalibrateHandEyeCalibrateHandEyeCalibrateHandEye for more details).

Camera-related data

ItemTypeItemTypeItemTypeItemTypeitemType='camera'"camera""camera""camera""camera":

ItemIdxItemIdxItemIdxItemIdxitemIdx determines, if data is set for all cameras in general or for a specific camera. With ItemIdxItemIdxItemIdxItemIdxitemIdx='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_dataCreateCalibDataCreateCalibDataCreateCalibData), only the specified camera is affected by the changes.

By selecting the following parameters in DataNameDataNameDataNameDataNamedataName, you can specify which camera parameters shall be optimized during the calibration performed by calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCameras:

'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings":

The camera parameters listed in DataValueDataValueDataValueDataValuedataValue are marked for optimization for the affected camera(s) (additionally to the camera parameters that were already marked for optimization). Note that by default, all parameters are marked for the optimization. That is, 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings" is mainly suited to add previously excluded parameters again.

'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings":

The camera parameters listed in DataValueDataValueDataValueDataValuedataValue are excluded from the optimization for the affected camera(s).

The following camera parameters can be passed in DataValueDataValueDataValueDataValuedataValue:

Internal camera parameters

'focus'"focus""focus""focus""focus":

Focal length of the lens (only for perspective cameras, i.e., cameras of type 'area_scan_division', 'area_scan_polynomial', 'area_scan_tilt_division', 'area_scan_tilt_polynomial', 'area_scan_tilt_image_side_telecentric_division', 'area_scan_tilt_image_side_telecentric_polynomial', 'area_scan_hypercentric_division', 'area_scan_hypercentric_polynomial', and 'line_scan').

'magnification'"magnification""magnification""magnification""magnification":

Magnification of the lens (only for telecentric cameras, i.e., cameras of type 'area_scan_telecentric_division', 'area_scan_telecentric_polynomial', 'area_scan_tilt_bilateral_telecentric_division', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_division', and 'area_scan_tilt_object_side_telecentric_polynomial').

'kappa'"kappa""kappa""kappa""kappa":

Divisional distortion coefficient kappa (only for cameras of type 'area_scan_division', 'area_scan_telecentric_division', 'area_scan_tilt_division', 'area_scan_tilt_bilateral_telecentric_division', 'area_scan_tilt_object_side_telecentric_division', 'area_scan_hypercentric_division', and 'line_scan').

'k1'"k1""k1""k1""k1",'k2'"k2""k2""k2""k2",'k3'"k3""k3""k3""k3":

Polynomial radial distortion parameters (only for cameras of type 'area_scan_polynomial', 'area_scan_telecentric_polynomial', 'area_scan_tilt_polynomial', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_polynomial', and 'area_scan_hypercentric_polynomial').

'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 (only for cameras of type 'area_scan_polynomial', 'area_scan_telecentric_polynomial', 'area_scan_tilt_polynomial', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_polynomial', and 'area_scan_hypercentric_polynomial').

'poly'"poly""poly""poly""poly":

An alias parameter for all polynomial distortion parameters, i.e., k1, k2, k3, p1 and p2 (only for cameras of type 'area_scan_polynomial', 'area_scan_telecentric_polynomial', 'area_scan_tilt_polynomial', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_polynomial', and 'area_scan_hypercentric_polynomial').

'image_plane_distance'"image_plane_distance""image_plane_distance""image_plane_distance""image_plane_distance":

The distance of the tilted image plane from the perspective projection center (only for cameras with tilt lenses that perform a perspective projection on the image side of the lens, i.e., cameras of type 'area_scan_tilt_division', 'area_scan_tilt_polynomial', 'area_scan_tilt_object_side_telecentric_division', and 'area_scan_tilt_object_side_telecentric_polynomial').

'tilt'"tilt""tilt""tilt""tilt":

Tilt and rotation of the tilt lens (only for cameras with tilt lenses, i.e., cameras of type 'area_scan_tilt_division', 'area_scan_tilt_polynomial', 'area_scan_tilt_bilateral_telecentric_division', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_division', and 'area_scan_tilt_object_side_telecentric_polynomial').

'cx'"cx""cx""cx""cx",'cy'"cy""cy""cy""cy":

Coordinates of the camera's principal point.

'principal_point'"principal_point""principal_point""principal_point""principal_point":

An alias parameter for 'cx'"cx""cx""cx""cx" and 'cy'"cy""cy""cy""cy".

'sx'"sx""sx""sx""sx",'sy'"sy""sy""sy""sy":

Sensor element dimensions.

'params'"params""params""params""params":

All internal camera parameters.

External camera parameters

'alpha'"alpha""alpha""alpha""alpha",'beta'"beta""beta""beta""beta",'gamma'"gamma""gamma""gamma""gamma":

Rotation part of the camera pose.

'transx'"transx""transx""transx""transx",'transy'"transy""transy""transy""transy",'transz'"transz""transz""transz""transz":

Translation part of the camera pose.

'pose'"pose""pose""pose""pose":

All external camera parameters.

Further camera parameters

'vx'"vx""vx""vx""vx",'vy'"vy""vy""vy""vy",'vz'"vz""vz""vz""vz":

Motion vector parameters (for cameras of type 'line_scan' only).

'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_calibrationCameraCalibrationCameraCalibrationCameraCalibration.

Data related to calibration object poses

ItemTypeItemTypeItemTypeItemTypeitemType='calib_obj_pose'"calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose":

ItemIdxItemIdxItemIdxItemIdxitemIdx determines, if data is set for all calibration object poses in general or for a specific calibration object pose. With ItemIdxItemIdxItemIdxItemIdxitemIdx='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 DataNameDataNameDataNameDataNamedataName, you can specify which calibration object pose parameters shall be optimized during the calibration performed by calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCameras:

'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings":

The calibration object pose settings listed in DataValueDataValueDataValueDataValuedataValue are marked for optimization for the affected pose(s). Note that by default, all calibration pose parameters are marked for the optimization. That is, 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings" is mainly suited to add previously excluded parameters again.

'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings":

The calibration object pose settings listed in DataValueDataValueDataValueDataValuedataValue are excluded from the optimization for the affected pose(s).

The following calibration pose parameters can be passed in DataValueDataValueDataValueDataValuedataValue:

'alpha'"alpha""alpha""alpha""alpha",'beta'"beta""beta""beta""beta",'gamma'"gamma""gamma""gamma""gamma":

Rotation part of the calibration object pose.

'transx'"transx""transx""transx""transx",'transy'"transy""transy""transy""transy",'transz'"transz""transz""transz""transz":

Translation part of the calibration object pose.

'pose'"pose""pose""pose""pose":

All calibration object pose parameters.

'all'"all""all""all""all":

All calibration objects optimization parameters, i.e., the same as '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_dataGetCalibDataGetCalibDataGetCalibData.

Hand-eye calibration related data

ItemTypeItemTypeItemTypeItemTypeitemType='tool'"tool""tool""tool""tool":

ItemIdxItemIdxItemIdxItemIdxitemIdx must be set to a valid calibration object pose index.

By selecting the following parameter in DataNameDataNameDataNameDataNamedataName, you can set the pose of the robot tool:

'tool_in_base_pose'"tool_in_base_pose""tool_in_base_pose""tool_in_base_pose""tool_in_base_pose":

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 ItemIdxItemIdxItemIdxItemIdxitemIdx (corresponds to the parameter CalibObjPoseIdx of any of the operators find_calib_objectfind_calib_objectFindCalibObjectFindCalibObjectFindCalibObject, set_calib_data_observ_poseset_calib_data_observ_poseSetCalibDataObservPoseSetCalibDataObservPoseSetCalibDataObservPose, or set_calib_data_observ_pointsset_calib_data_observ_pointsSetCalibDataObservPointsSetCalibDataObservPointsSetCalibDataObservPoints).

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

CalibDataIDCalibDataIDCalibDataIDCalibDataIDcalibDataID (input_control, state is modified)  calib_data HCalibData, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of a calibration data model.

ItemTypeItemTypeItemTypeItemTypeitemType (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Type of calibration data item.

Default value: 'model' "model" "model" "model" "model"

List of values: 'calib_obj_pose'"calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose", 'camera'"camera""camera""camera""camera", 'model'"model""model""model""model", 'tool'"tool""tool""tool""tool"

ItemIdxItemIdxItemIdxItemIdxitemIdx (input_control)  number(-array) HTupleHTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Index of the affected item (depending on the selected ItemTypeItemTypeItemTypeItemTypeitemType).

Default value: 'general' "general" "general" "general" "general"

Suggested values: 0, 1, 2, 'general'"general""general""general""general"

DataNameDataNameDataNameDataNamedataName (input_control)  attribute.name HTupleHTupleHtuple (string) (string) (HString) (char*)

Parameter(s) to set.

Default value: 'reference_camera' "reference_camera" "reference_camera" "reference_camera" "reference_camera"

List of values: 'calib_settings'"calib_settings""calib_settings""calib_settings""calib_settings", 'excluded_settings'"excluded_settings""excluded_settings""excluded_settings""excluded_settings", 'optimization_method'"optimization_method""optimization_method""optimization_method""optimization_method", '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"

DataValueDataValueDataValueDataValuedataValue (input_control)  attribute.value(-array) HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

New value(s).

Default value: 0

Suggested values: 0, 1, 2, 'all'"all""all""all""all", 'pose'"pose""pose""pose""pose", 'params'"params""params""params""params", 'alpha'"alpha""alpha""alpha""alpha", 'beta'"beta""beta""beta""beta", 'gamma'"gamma""gamma""gamma""gamma", 'transx'"transx""transx""transx""transx", 'transy'"transy""transy""transy""transy", 'transz'"transz""transz""transz""transz", 'focus'"focus""focus""focus""focus", 'magnification'"magnification""magnification""magnification""magnification", 'kappa'"kappa""kappa""kappa""kappa", 'poly'"poly""poly""poly""poly", 'poly_tan_2'"poly_tan_2""poly_tan_2""poly_tan_2""poly_tan_2", 'k1'"k1""k1""k1""k1", 'k2'"k2""k2""k2""k2", 'k3'"k3""k3""k3""k3", 'image_plane_dist'"image_plane_dist""image_plane_dist""image_plane_dist""image_plane_dist", 'tilt'"tilt""tilt""tilt""tilt", 'principal_point'"principal_point""principal_point""principal_point""principal_point", 'cx'"cx""cx""cx""cx", 'cy'"cy""cy""cy""cy", 'sx'"sx""sx""sx""sx", 'sy'"sy""sy""sy""sy", 'vx'"vx""vx""vx""vx", 'vy'"vy""vy""vy""vy", 'vz'"vz""vz""vz""vz", 'linear'"linear""linear""linear""linear", 'nonlinear'"nonlinear""nonlinear""nonlinear""nonlinear"

Example (HDevelop)

* Here, the cell size is known exactly, thus it is excluded from
* the optimization.
set_calib_data (CalibDataID, 'camera', 'general', 'excluded_settings', \
                ['sx','sy'])

Possible Predecessors

set_calib_data_observ_pointsset_calib_data_observ_pointsSetCalibDataObservPointsSetCalibDataObservPointsSetCalibDataObservPoints, find_calib_objectfind_calib_objectFindCalibObjectFindCalibObjectFindCalibObject

Possible Successors

calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCameras, calibrate_hand_eyecalibrate_hand_eyeCalibrateHandEyeCalibrateHandEyeCalibrateHandEye

Module

Calibration


ClassesClasses | | Operators