hom_mat3d_to_poseT_hom_mat3d_to_poseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose (Operator)

Name

hom_mat3d_to_poseT_hom_mat3d_to_poseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose — Konvertieren einer homogenen Transformationsmatrix in eine 3D-Lage (Pose).

Signatur

hom_mat3d_to_pose( : : HomMat3D : Pose)

Herror T_hom_mat3d_to_pose(const Htuple HomMat3D, Htuple* Pose)

void HomMat3dToPose(const HTuple& HomMat3D, HTuple* Pose)

HPose HHomMat3D::HomMat3dToPose() const

static void HOperatorSet.HomMat3dToPose(HTuple homMat3D, out HTuple pose)

HPose HHomMat3D.HomMat3dToPose()

def hom_mat3d_to_pose(hom_mat_3d: Sequence[float]) -> Sequence[Union[int, float]]

Beschreibung

hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose konvertiert eine homogene Transformationsmatrix HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d in eine 3D-Lage PosePosePosePoseposepose mit Typ-Code 0. Details zu 3D-Lagen und den zugehörigen Transformationsmatrizen findet sich bei create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose.

Ein typischer Anwendungsfall von hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose ist, dass eine 3D-Lage zuvor mit pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d in eine homogene Transformationsmatrix konvertiert wurde, um sie z.B. mit hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate oder hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate weiter zu transformieren, und dann wieder zurück in ein 3D-Lage konvertiert werden soll, um die als Eingabe für Operatoren wie image_points_to_world_planeimage_points_to_world_planeImagePointsToWorldPlaneImagePointsToWorldPlaneImagePointsToWorldPlaneimage_points_to_world_plane zu nutzen.

Achtung

hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose unterstützt nur starre Transformationen in HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d. Für nicht-starre Transformationen versucht hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose eine 3D-Lage zurückzugeben, welche ähnlich der Transformation in HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d ist. Weicht HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d jedoch stark von einer nicht-starren Transformation ab, so kann auch die erzeugte 3D-Lage stark von HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d abweichen.

Ausführungsinformationen

Parameter

HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d (input_control)  hom_mat3d HHomMat3D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Homogene Transformationsmatrix.

PosePosePosePoseposepose (output_control)  pose HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

äquivalente 3D-Lage (Pose).

Parameteranzahl: 7

Beispiel (HDevelop)

* Calibrate camera.
calibrate_cameras (CalibDataID,Error)
* Get reference pose (pose 2 of calibration object 0).
get_calib_data (CalibDataID, 'calib_obj_pose',\
                [0,2], 'pose', ObjInCameraPose)
*  Convert pose to homogeneous transformation matrix.
pose_to_hom_mat3d(ObjInCameraPose, cam_H_cal)
*  Rotate it 90 degrees around its y-axis to obtain a world coordinate system
*  whose y- and z-axis lie in the plane of the calibration plate while the
*  x-axis point 'upwards': cam_H_w = cam_H_cal * RotY(90).
hom_mat3d_identity(HomMat3DIdent)
hom_mat3d_rotate(HomMat3DIdent, rad(90), 'y', 0, 0, 0, \
                 HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
* Convert transformed matrix back to pose.
hom_mat3d_to_pose (cam_H_w, Pose)

Ergebnis

Sind die Parameterwerte korrekt, dann liefert hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate, hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate, hom_mat3d_inverthom_mat3d_invertHomMat3dInvertHomMat3dInvertHomMat3dInverthom_mat3d_invert

Nachfolger

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, write_posewrite_poseWritePoseWritePoseWritePosewrite_pose, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab, sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab

Siehe auch

create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab, sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab, write_posewrite_poseWritePoseWritePoseWritePosewrite_pose, read_poseread_poseReadPoseReadPoseReadPoseread_pose, pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d, project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPointproject_3d_point, get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight, hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate, hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate, hom_mat3d_inverthom_mat3d_invertHomMat3dInvertHomMat3dInvertHomMat3dInverthom_mat3d_invert, affine_trans_point_3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3d

Modul

Foundation