Change the representation type of 3D pose parameters.
::convert_pose_type converts the 3D pose PoseIn into a 3D pose PoseOut with a different representation type.
A 3D pose defines a 3D transformation consisting of a translation and a rotation. Halcon supports different representation types for such a transformation. This can be, for example, external camera parameters, given by a 3D translation vector (in meters), three rotation angles, and the code of the representation type of the 3D transformation. For example, the value '0' is the code of representation type 1, and signifies that the transformation of a point is described, that the 3D rotation is applied before the translation, that the rotation is given by angles (in degrees), and that the order of the rotations is Gamma-Beta-Alpha, i.e., the first rotation is around the z-axis, the second rotation around the y-axis, and the third roation around the x-axis. The meaning of the other representation types is described with the operator ::create_pose.
The parameter ViewOfTransform determines, whether the new transformation PoseOut describes the transformation of a point ('point') or the transformation of a coordinate system ('coordinate_system'). OrderOfTransform determines whether the rotation ('Rp+T') or the translation ('R(p-T)') is applied first. The meaning of the three rotation values is determined by OrderOfRotation. The values 'gba' and 'abg' signify that the rotation parameters describe the three rotation angles alpha (around the x-axis), beta (around the y-axis), and gamma (around the z-axis) in the 3D transformation. For 'gba', the rotation order is gamma , beta , alpha , and for 'abg' it is alpha , beta , gamma . If OrderOfRotation is passed as 'rodriguez', the rotation parameters are interpreted as Rodriguez rotation vector.
|
PoseIn (input_control) |
pose-array -> HTuple.double / long |
| 3D transformation. | |
| Number of elements: 7 | |
|
OrderOfTransform (input_control) |
string -> HTuple.char * |
| Order of rotation and translation. | |
| Default value: ''Rp+T'' | |
| Suggested values: ''Rp+T'', ''R(p-T)'' | |
|
OrderOfRotation (input_control) |
string -> HTuple.char * |
| Meaning of the rotation values. | |
| Default value: ''gba'' | |
| Suggested values: ''gba'', ''abg'', ''rodriguez'' | |
|
ViewOfTransform (input_control) |
string -> HTuple.char * |
| View of transformation. | |
| Default value: ''point'' | |
| Suggested values: ''point'', ''coordinate_system'' | |
|
PoseOut (output_control) |
pose-array -> HTuple.double * / long * |
| 3D transformation. | |
| Number of elements: 7 | |
HTuple Pose, Pose2;
// get pose (external camera parameters):
::read_pose ("campose.dat", &Pose) ;
// convert pose to a pose with desired semantic
::convert_pose_type ( Pose, "Rp+T", "abg", "coordinate_system", &Pose2);
::create_pose returns H_MSG_TRUE if all parameter values are correct. If necessary, an exception handling is raised.
::create_pose, ::hom_mat3d_to_pose, ::camera_calibration, ::hand_eye_calibration
::create_pose, ::get_pose_type, ::write_pose, ::read_pose
Camera calibration