KlassenKlassenKlassenKlassen | | | | Operatoren

write_poseT_write_poseWritePosewrite_poseWritePoseWritePose (Operator)

Name

write_poseT_write_poseWritePosewrite_poseWritePoseWritePose — Speichern einer 3D-Lage (Pose) in eine Textdatei.

Signatur

write_pose( : : Pose, PoseFile : )

Herror T_write_pose(const Htuple Pose, const Htuple PoseFile)

Herror write_pose(const HTuple& Pose, const HTuple& PoseFile)

void WritePose(const HTuple& Pose, const HTuple& PoseFile)

void HPose::WritePose(const HString& PoseFile) const

void HPose::WritePose(const char* PoseFile) const

void HOperatorSetX.WritePose(
[in] VARIANT Pose, [in] VARIANT PoseFile)

void HPoseX.WritePose(
[in] VARIANT Pose, [in] BSTR PoseFile)

static void HOperatorSet.WritePose(HTuple pose, HTuple poseFile)

void HPose.WritePose(string poseFile)

Beschreibung

write_posewrite_poseWritePosewrite_poseWritePoseWritePose dient zum Abspeichern einer 3D-Lage PosePosePosePosePosepose in eine Textdatei mit dem Namen PoseFilePoseFilePoseFilePoseFilePoseFileposeFile. Die Dateiendung für die 3D-Lage ist in HALCON 'dat'.

Eine 3D-Lage (Pose) beschreibt eine starre 3D-Transformation, d.h. eine Transformation bestehend aus einer beliebigen Translation und Rotation, mit 6 Parametern, drei für die Translation, drei für die Rotation. Mit Hilfe eines siebten Parameters kann zwischen verschiedenen Pose-Typen unterschieden werden (siehe create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose).

Eine mit write_posewrite_poseWritePosewrite_poseWritePoseWritePose erzeugte Datei hat z.B. folgendes Aussehen:

  # 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

Parallelisierung

Parameter

PosePosePosePosePosepose (input_control)  pose HPose, HTupleHTupleHTupleHPoseX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

3D-Lage (Pose).

Parameteranzahl: 7

PoseFilePoseFilePoseFilePoseFilePoseFileposeFile (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Dateiname der Kameraparameterdatei.

Defaultwert: 'campose.dat' "campose.dat" "campose.dat" "campose.dat" "campose.dat" "campose.dat"

Wertevorschläge: 'campose.dat'"campose.dat""campose.dat""campose.dat""campose.dat""campose.dat", 'campose_initial.dat'"campose_initial.dat""campose_initial.dat""campose_initial.dat""campose_initial.dat""campose_initial.dat", 'campose_final.dat'"campose_final.dat""campose_final.dat""campose_final.dat""campose_final.dat""campose_final.dat"

Dateiendung: .dat

Beispiel (HDevelop)

* Perform hand-eye calibration.
calibrate_hand_eye (CalibDataID, Errors)
* Query the camera parameters and the poses.
get_calib_data (CalibDataID, 'camera', 0, 'params', CamParam)
* Get poses computed by the hand eye calibration.
get_calib_data (CalibDataID, 'camera', 0, 'base_in_cam_pose', BaseInCamPose)
get_calib_data (CalibDataID, 'calib_obj', 0,\
                'obj_in_tool_pose', ObjInToolPose)
* Store the camera parameters to file.
write_cam_par (CamParam, DataNameStart + 'final_campar.dat')
* Save the hand eye calibration results to file.
write_pose (BaseInCamPose, DataNameStart + 'final_pose_cam_base.dat')
write_pose (ObjInToolPose, DataNameStart + 'final_pose_tool_calplate.dat')

Ergebnis

Sind die Parameterwerte korrekt und konnte die Datei erfolgreich geschrieben werden, dann liefert write_posewrite_poseWritePosewrite_poseWritePoseWritePose den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration, get_calib_dataget_calib_dataGetCalibDataget_calib_dataGetCalibDataGetCalibData, hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose

Siehe auch

create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose, find_marks_and_posefind_marks_and_poseFindMarksAndPosefind_marks_and_poseFindMarksAndPoseFindMarksAndPose, camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration, disp_caltabdisp_caltabDispCaltabdisp_caltabDispCaltabDispCaltab, sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab, read_poseread_poseReadPoseread_poseReadPoseReadPose, pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d, hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren