Herror ::read_pose (
    const HTuple &PoseFile,
    HTuple *Pose
)

Read 3D pose data from text file.

::read_pose is used to read the 3D pose Pose from a text file with the name PoseFile.

The output tupel Pose describes 3D pose parameters which describe a 3D transform, for example the external camera parameters. These are given by the 3D translational vector (in meters), the three rotation angles and the code of the representation type of the 3D transform: E.g., the value '0' is the code of the representation type 1 and says, that the transform of a point is described, hereby the 3D rotation is performed before the 3D translation, that the three rotations are specified as angles (in degrees), and that the rotation order is Gamma-Beta-Alpha, i.e., the first rotation is around the Z-axis, the second one around the new Y-axis, and the third one around the new X-axis, which is generated after the second rotation. ::pose_to_hom_mat3d operates with all types of 3D transforms. The sense of the other representation types is explained at ::create_pose.

A suitable file can be generated by the operator ::write_pose and looks like the following:

  # 3D POSE PARAMETERS: rotation and translation

  # Used representation type:
  f 0

  # Rotation angles [deg] or Rodriguez-vector:
  r -17.8134 1.83816 0.288092

  # Translational vector (x y z [m]):
  t 0.280164 0.150644 1.7554


Parameters

PoseFile (input_control)
filename -> HTuple.char *
File name of the external camera parameters.
Default value: 'campose.dat'
List of values: 'campose.dat', 'campose.initial', 'campose.final'

Pose (output_control)
pose-array -> HTuple.double * / long *
External camera parameters.
Number of elements: 7


Example
HTuple CamPose;
// get pose (external camera parameters):
::read_pose("campose.dat",&CamPose);

Result

::read_pose returns H_MSG_TRUE if all parameter values are correct and the file has been read successfully. If necessary an exception handling is raised.


Possible Predecessors

::read_cam_par


Possible Successors

::pose_to_hom_mat3d, ::camera_calibration, ::disp_caltab, ::sim_caltab


See also

::create_pose, ::find_marks_and_pose, ::camera_calibration, ::disp_caltab, ::sim_caltab, ::write_pose, ::pose_to_hom_mat3d, ::hom_mat3d_to_pose


Module

Camera calibration



Copyright © 1996-2002 MVTec Software GmbH