Skip to content

read_poseReadPoseReadPoseread_poseT_read_pose🔗

Short description🔗

read_poseReadPoseReadPoseread_poseT_read_pose — Read a 3D pose from a text file.

Signature🔗

read_pose( filename.read PoseFile, out pose Pose )void ReadPose( const HTuple& PoseFile, HTuple* Pose )static void HOperatorSet.ReadPose( HTuple poseFile, out HTuple pose )def read_pose( pose_file: str ) -> Sequence[Union[int, float]]

Herror T_read_pose( const Htuple PoseFile, Htuple* Pose )

void HPose::ReadPose( const HString& PoseFile )

void HPose::ReadPose( const char* PoseFile )

void HPose::ReadPose( const wchar_t* PoseFile ) (Windows only)

void HPose.ReadPose( string poseFile )

Description🔗

read_poseReadPose is used to read the 3D pose Poseposepose from a text file with the name PoseFileposeFilepose_file. The default HALCON file extension for the 3D pose is 'dat'.

A pose describes a rigid 3D transformation, i.e., a transformation consisting of an arbitrary translation and rotation, with 6 parameters, three for the translation, three for the rotation. With a seventh parameter different pose types can be indicated (see create_poseCreatePose).

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

    # 3D POSE PARAMETERS: rotation and translation

    # Used representation type:
    f 0

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

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

PoseFileposeFilepose_file (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

File name of the external camera parameters.

Default: 'campose.dat'"campose.dat"
Suggested values: 'campose.dat', 'campose_initial.dat', 'campose_final.dat'"campose.dat", "campose_initial.dat", "campose_final.dat"
File extension: .dat

Poseposepose (output_control) pose → (real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

3D pose.

Number of elements: 7

Result🔗

read_poseReadPose returns 2 (H_MSG_TRUE) if all parameter values are correct and the file has been read successfully. If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_cam_parReadCamPar

Possible successors

pose_to_hom_mat3dPoseToHomMat3d, camera_calibrationCameraCalibration, disp_caltabDispCaltab, sim_caltabSimCaltab

See also

create_poseCreatePose, find_marks_and_poseFindMarksAndPose, camera_calibrationCameraCalibration, disp_caltabDispCaltab, sim_caltabSimCaltab, write_poseWritePose, pose_to_hom_mat3dPoseToHomMat3d, hom_mat3d_to_poseHomMat3dToPose

Module🔗

Foundation